From d91dd6f334b9a9b72fe2743b0e3096d69504c222 Mon Sep 17 00:00:00 2001 From: HuyNguyen Date: Thu, 31 Aug 2023 11:35:17 +0700 Subject: [PATCH] Get full width when calculate message bubble size --- lib/utils/extension/build_context_extension.dart | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/utils/extension/build_context_extension.dart b/lib/utils/extension/build_context_extension.dart index 868d7d90c1..aa80806034 100644 --- a/lib/utils/extension/build_context_extension.dart +++ b/lib/utils/extension/build_context_extension.dart @@ -1,4 +1,3 @@ -import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; @@ -124,10 +123,7 @@ extension ContextExtensionss on BuildContext { T? desktop, T? watch, }) { - var deviceWidth = mediaQuerySize.shortestSide; - if (PlatformInfos.isDesktop) { - deviceWidth = mediaQuerySize.width; - } + final deviceWidth = mediaQuerySize.width; if (deviceWidth >= minDesktopWidth && desktop != null) { return desktop; } else if (deviceWidth >= minTabletWidth &&