Closed Refaat2020 closed 2 years ago
@Refaat2020 check #350
It is work for me on this way ` void main() { runApp(MyApp()); }
class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key);
@override Widget build(BuildContext context) { return ScreenUtilInit( designSize: Size(360, 690), minTextAdapt: true, splitScreenMode: true, builder: () => GetMaterialApp( debugShowCheckedModeBanner: false, title: "Application", initialRoute: AppPages.INITIAL, getPages: AppPages.routes, //... other code builder: (context, widget) { //add this line ScreenUtil.setContext(context); return MediaQuery( //Setting font does not change with system font size data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), child: widget!, ); }, theme: ThemeData( primaryColor: Colors.red, textTheme: TextTheme( //要支持下面这个需要使用第一种初始化方式 button: TextStyle(fontSize: 45.sp)), ), ), ); } }
`
It's worked fine as well
Please refer to the below link: [https://github.com/OpenFlutter/flutter_screenutil/issues/350#issuecomment-1074005120]
when the app is closed and reopened the App not rendering