mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
fixes bugs and re add checkboxes theme
This commit is contained in:
@ -15,7 +15,8 @@ Future<void> main() async {
|
||||
initialSetup();
|
||||
String checkToken = await AuthBloc.getTokenAndValidate();
|
||||
GoRouter router = GoRouter(
|
||||
initialLocation: checkToken == 'Success' ? RoutesConst.home : RoutesConst.auth,
|
||||
initialLocation:
|
||||
checkToken == 'Success' ? RoutesConst.home : RoutesConst.auth,
|
||||
routes: AppRoutes.getRoutes(),
|
||||
);
|
||||
runApp(MyApp(
|
||||
@ -54,7 +55,9 @@ class MyApp extends StatelessWidget {
|
||||
fontFamily: 'Aftika',
|
||||
textTheme: const TextTheme(
|
||||
bodySmall: TextStyle(
|
||||
fontSize: 13, color: ColorsManager.whiteColors, fontWeight: FontWeight.bold),
|
||||
fontSize: 13,
|
||||
color: ColorsManager.whiteColors,
|
||||
fontWeight: FontWeight.bold),
|
||||
bodyMedium: TextStyle(color: Colors.black87, fontSize: 14),
|
||||
bodyLarge: TextStyle(fontSize: 16, color: Colors.white),
|
||||
headlineSmall: TextStyle(color: Colors.black87, fontSize: 18),
|
||||
@ -65,7 +68,40 @@ class MyApp extends StatelessWidget {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: ColorsManager.blueColor,
|
||||
primary: ColorsManager.blueColor,
|
||||
onSurface: Colors.grey.shade400,
|
||||
),
|
||||
switchTheme: SwitchThemeData(
|
||||
thumbColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return ColorsManager.blueColor;
|
||||
}
|
||||
return ColorsManager.whiteColors;
|
||||
}),
|
||||
trackColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return ColorsManager.blueColor.withOpacity(0.5);
|
||||
}
|
||||
return ColorsManager.whiteColors;
|
||||
}),
|
||||
),
|
||||
checkboxTheme: CheckboxThemeData(
|
||||
fillColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return ColorsManager.blueColor;
|
||||
}
|
||||
return Colors.grey.shade200;
|
||||
}),
|
||||
checkColor: WidgetStateProperty.all(Colors.white),
|
||||
side: const BorderSide(color: ColorsManager.whiteColors),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
routeInformationProvider: router.routeInformationProvider,
|
||||
routerDelegate: router.routerDelegate,
|
||||
routeInformationParser: router.routeInformationParser,
|
||||
|
Reference in New Issue
Block a user