Closed yingshaoxo closed 1 year ago
I'm not sure if this is the cause of the plugin,
Did you tried to create a web client project, and run the code to see if it really blocks it?
import 'package:get/get.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
() async {
await ScreenUtil.ensureScreenSize();
runApp(GetMaterialApp(
initialRoute: RoutesMap.login,
getPages: [
GetPage(
name: RoutesMap.location_management,
page: () => const LocationManagementHomePage()),
GetPage(name: RoutesMap.login, page: () => const LoginPage()),
],
theme: ThemeData(
primarySwatch: Colors.blue,
),
),
));
}();
}
On Fri, Mar 10, 2023 at 2:23 PM LiZhuoyuan @.***> wrote:
I'm not sure if this is the cause of the plugin,
— Reply to this email directly, view it on GitHub https://github.com/OpenFlutter/flutter_screenutil/issues/462#issuecomment-1463333444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDE7LJXVROYY6K55CFL6ADW3LCHLANCNFSM6AAAAAAVPOU7K4 . You are receiving this because you authored the thread.Message ID: @.***>
This issue is stale because it has been open for 30 days with no activity.
Anybody solved that? When ScreenUtil.ensureScreenSize() called, we don't have value to FlutterView and app show nothing.
any update?
did anyone find a solution? I'm stuck. I am using GoRoute, and need to check the size for web & mobile before passing routes in Material.route
I tried to execute flutter run(on web) in the example, and the problem was not reproduced. There is no problem in the release environment. Can you provide a minimal example?
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
This is still an issue. The main function just stops here on web
Flutter 3.7.6 • channel stable • https://github.com/flutter/flutter.git Framework • revision 12cb4eb7a0 (3 days ago) • 2023-03-01 10:29:26 -0800 Engine • revision ada363ee93 Tools • Dart 2.19.3 • DevTools 2.20.1
await ScreenUtil.ensureScreenSize();
will block the main process on web client.