in Flutter how can I use MediaQuery.of(context).copyWith(textScaleFactor:1.0) in the following main.dart?
I want my app is independent from the various screen size of iOS and Android that the user can set in the settings
return MultiProvider(
providers: <SingleChildWidget>[
...providers,
],
child: DynamicTheme(
defaultBrightness: Brightness.light,
data: (Brightness brightness) {
if (brightness == Brightness.light) {
return themeData(ThemeData.light());
} else {
return themeData(ThemeData.dark());
}
},
themedWidgetBuilder: (BuildContext context, ThemeData theme) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'MyApp',
theme: theme,
initialRoute: '/',
onGenerateRoute: router.generateRoute,
localizationsDelegates: <LocalizationsDelegate<dynamic>>[
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
EasyLocalization.of(context).delegate,
DefaultCupertinoLocalizations.delegate
],
supportedLocales: EasyLocalization.of(context).supportedLocales,
locale: EasyLocalization.of(context).locale,
);
}));