i would like to apply an application wide ScrollConfigurationand also textScaleFactorproperty.
I know, I can set the ScrollConfiguration this way:
@override
Widget build(BuildContext context) {
return MaterialApp(
home: const AuthGate(),
builder: (context, child) {
return ScrollConfiguration(
behavior: MyBehavior(),
child: child!,
);
},
);
}
and set the textScaleFactor this way:
@override
Widget build(BuildContext context) {
return MaterialApp(
home: const AuthGate(),
builder: (context, child) {
final mediaQueryData = MediaQuery.of(context);
return MediaQuery(
data: mediaQueryData.copyWith(textScaleFactor: 1.0),
child: child!,
);
},
);
}
My question is, how can i apply both?