TF-398 Fix responsive on browser firefox
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import 'package:core/utils/app_logger.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@@ -25,10 +27,9 @@ class ResponsiveUtils {
|
|||||||
double getSizeScreenShortestSide(BuildContext context) => context.mediaQueryShortestSide;
|
double getSizeScreenShortestSide(BuildContext context) => context.mediaQueryShortestSide;
|
||||||
|
|
||||||
double getDeviceWidth(BuildContext context) {
|
double getDeviceWidth(BuildContext context) {
|
||||||
if (GetPlatform.isDesktop) {
|
final widthScreen = kIsWeb ? context.width : context.mediaQueryShortestSide;
|
||||||
return context.width;
|
log('ResponsiveUtils::getDeviceWidth(): widthScreen: $widthScreen');
|
||||||
}
|
return widthScreen;
|
||||||
return context.mediaQueryShortestSide;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isMobile(BuildContext context) => getDeviceWidth(context) < minTabletWidth;
|
bool isMobile(BuildContext context) => getDeviceWidth(context) < minTabletWidth;
|
||||||
|
|||||||
Reference in New Issue
Block a user