Skip to content

Commit

Permalink
Get full width when calculate message bubble size
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Aug 31, 2023
1 parent 3724edb commit d91dd6f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/utils/extension/build_context_extension.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

Expand Down Expand Up @@ -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 &&
Expand Down

0 comments on commit d91dd6f

Please sign in to comment.