feat: apply dark theme
This commit is contained in:
parent
073af6f492
commit
fee559ba9a
19
lib/app.dart
19
lib/app.dart
|
@ -48,19 +48,32 @@ class MyApp extends StatelessWidget {
|
||||||
return supportedLocales.firstWhere((l) => l.languageCode == 'en');
|
return supportedLocales.firstWhere((l) => l.languageCode == 'en');
|
||||||
};
|
};
|
||||||
|
|
||||||
return Container(
|
return AntTheme(
|
||||||
key: auth.rootKey,
|
key: auth.rootKey,
|
||||||
child: CupertinoApp.router(
|
data: AntThemeData(brightness: theme.brightness),
|
||||||
|
child: Builder(
|
||||||
|
builder: (context) {
|
||||||
|
final antTheme = AntTheme.of(context);
|
||||||
|
|
||||||
|
return CupertinoApp.router(
|
||||||
routeInformationProvider: router.routeInformationProvider,
|
routeInformationProvider: router.routeInformationProvider,
|
||||||
routeInformationParser: router.routeInformationParser,
|
routeInformationParser: router.routeInformationParser,
|
||||||
routerDelegate: router.routerDelegate,
|
routerDelegate: router.routerDelegate,
|
||||||
theme: CupertinoThemeData(
|
theme: CupertinoThemeData(
|
||||||
brightness: theme.brightness,
|
brightness: theme.brightness,
|
||||||
primaryColor: AntTheme.of(context).colorPrimary,
|
primaryColor: antTheme.colorPrimary,
|
||||||
|
textTheme: CupertinoTextThemeData(
|
||||||
|
textStyle: TextStyle(
|
||||||
|
fontSize: antTheme.fontSizeMain,
|
||||||
|
color: antTheme.colorText,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||||
supportedLocales: AppLocalizations.supportedLocales,
|
supportedLocales: AppLocalizations.supportedLocales,
|
||||||
localeListResolutionCallback: localeListResolutionCallback,
|
localeListResolutionCallback: localeListResolutionCallback,
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue