mirror of
https://github.com/git-touch/git-touch
synced 2025-02-08 07:38:45 +01:00
fix: text height behavior
This commit is contained in:
parent
56402d789c
commit
e2de7feec2
56
lib/app.dart
56
lib/app.dart
@ -15,9 +15,31 @@ class MyApp extends StatelessWidget {
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
|
||||
// ignore: prefer_function_declarations_over_variables
|
||||
final LocaleListResolutionCallback localeListResolutionCallback =
|
||||
(locales, supportedLocales) {
|
||||
return AntTheme(
|
||||
key: auth.rootKey,
|
||||
data: AntThemeData(brightness: theme.brightness),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final antTheme = AntTheme.of(context);
|
||||
|
||||
return CupertinoApp.router(
|
||||
routeInformationProvider: router.routeInformationProvider,
|
||||
routeInformationParser: router.routeInformationParser,
|
||||
routerDelegate: router.routerDelegate,
|
||||
theme: CupertinoThemeData(
|
||||
brightness: theme.brightness,
|
||||
primaryColor: antTheme.colorPrimary,
|
||||
scaffoldBackgroundColor: antTheme.colorBox,
|
||||
textTheme: CupertinoTextThemeData(
|
||||
textStyle: TextStyle(
|
||||
fontSize: antTheme.fontSizeMain,
|
||||
color: antTheme.colorText,
|
||||
),
|
||||
),
|
||||
),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
localeListResolutionCallback: (locales, supportedLocales) {
|
||||
// 1. user set locale
|
||||
// 2. system locale
|
||||
try {
|
||||
@ -46,33 +68,7 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
// 3. if none match, use the default
|
||||
return supportedLocales.firstWhere((l) => l.languageCode == 'en');
|
||||
};
|
||||
|
||||
return AntTheme(
|
||||
key: auth.rootKey,
|
||||
data: AntThemeData(brightness: theme.brightness),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final antTheme = AntTheme.of(context);
|
||||
|
||||
return CupertinoApp.router(
|
||||
routeInformationProvider: router.routeInformationProvider,
|
||||
routeInformationParser: router.routeInformationParser,
|
||||
routerDelegate: router.routerDelegate,
|
||||
theme: CupertinoThemeData(
|
||||
brightness: theme.brightness,
|
||||
primaryColor: antTheme.colorPrimary,
|
||||
scaffoldBackgroundColor: antTheme.colorBox,
|
||||
textTheme: CupertinoTextThemeData(
|
||||
textStyle: TextStyle(
|
||||
fontSize: antTheme.fontSizeMain,
|
||||
color: antTheme.colorText,
|
||||
),
|
||||
),
|
||||
),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
localeListResolutionCallback: localeListResolutionCallback,
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user