mirror of
https://github.com/git-touch/git-touch
synced 2025-02-08 15:48:41 +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 auth = Provider.of<AuthModel>(context);
|
||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
|
|
||||||
// ignore: prefer_function_declarations_over_variables
|
return AntTheme(
|
||||||
final LocaleListResolutionCallback localeListResolutionCallback =
|
key: auth.rootKey,
|
||||||
(locales, supportedLocales) {
|
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
|
// 1. user set locale
|
||||||
// 2. system locale
|
// 2. system locale
|
||||||
try {
|
try {
|
||||||
@ -46,33 +68,7 @@ class MyApp extends StatelessWidget {
|
|||||||
|
|
||||||
// 3. if none match, use the default
|
// 3. if none match, use the default
|
||||||
return supportedLocales.firstWhere((l) => l.languageCode == 'en');
|
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