mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 04:34:54 +00:00
initialized Routine Page
This commit is contained in:
@ -3,154 +3,336 @@ import 'package:flutter/material.dart';
|
||||
import 'color_manager.dart';
|
||||
import 'font_manager.dart';
|
||||
|
||||
ThemeData myTheme = ThemeData(
|
||||
///main colors
|
||||
primaryColor: ColorsManager.primaryColor,
|
||||
// colorScheme: ColorsManager.lightColorScheme,
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
abstract class ThemeManager {
|
||||
static bool isDarkTheme = false;
|
||||
|
||||
///text theme
|
||||
textTheme: const TextTheme(
|
||||
///display
|
||||
displayLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s35,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
static ThemeData selectTheme() => isDarkTheme ? darkTheme : lightTheme;
|
||||
static ThemeData lightTheme = ThemeData(
|
||||
///main colors
|
||||
primaryColor: ColorsManager.primaryColor,
|
||||
colorScheme: const ColorScheme(
|
||||
background: ColorsManager.backgroundColor,
|
||||
brightness: Brightness.light,
|
||||
primary: ColorsManager.primaryColor,
|
||||
onPrimary: ColorsManager.onPrimaryColor,
|
||||
secondary: ColorsManager.secondaryColor,
|
||||
onSecondary: ColorsManager.onSecondaryColor,
|
||||
error: Colors.red,
|
||||
onError: Colors.white,
|
||||
onBackground: ColorsManager.textPrimaryColor,
|
||||
surface: Colors.white,
|
||||
onSurface: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s20,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
|
||||
///text theme
|
||||
textTheme: const TextTheme(
|
||||
///display
|
||||
displayLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s35,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s20,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
///title
|
||||
titleLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s48,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s30,
|
||||
fontWeight: FontsManager.bold,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s25,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
///body
|
||||
bodyLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s12,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
labelLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
),
|
||||
|
||||
///title
|
||||
titleLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s48,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s30,
|
||||
fontWeight: FontsManager.bold,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s25,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
///button theme
|
||||
// buttonTheme: ButtonThemeData(
|
||||
// buttonColor: ColorsManager.primaryLightColor,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: AppPadding.p8),
|
||||
// textTheme: ButtonTextTheme.primary,
|
||||
// hoverColor: ColorsManager.primaryDarkColor,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// ),),
|
||||
//
|
||||
// textButtonTheme: TextButtonThemeData(
|
||||
// style: ButtonStyle(
|
||||
// backgroundColor:
|
||||
// MaterialStateProperty.all<Color>(ColorsManager.primaryLightColor),
|
||||
// padding: MaterialStateProperty.all<EdgeInsets>(
|
||||
// const EdgeInsets.all(AppPadding.p8),),
|
||||
// textStyle: MaterialStateProperty.all<TextStyle>(
|
||||
// const TextStyle(
|
||||
// fontFamily: FontsManager.fontFamily,
|
||||
// fontSize: FontSize.s16,
|
||||
// fontWeight: FontsManager.regular,
|
||||
// color: ColorsManager.onPrimaryLightColor,
|
||||
// ),
|
||||
// ),
|
||||
// // shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||
// // RoundedRectangleBorder(
|
||||
// // borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// // side: const BorderSide(color: Colors.grey),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
///input decoration theme
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.grey),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: ColorsManager.primaryColor),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
color: Colors.grey,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
),
|
||||
),
|
||||
|
||||
///body
|
||||
bodyLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
///card theme
|
||||
//TODO edit card theme
|
||||
cardTheme: const CardTheme(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
);
|
||||
|
||||
//TODO implement dark theme
|
||||
static ThemeData darkTheme = ThemeData(
|
||||
///main colors
|
||||
primaryColor: ColorsManager.primaryColor,
|
||||
colorScheme: const ColorScheme(
|
||||
background: ColorsManager.backgroundColor,
|
||||
brightness: Brightness.light,
|
||||
primary: ColorsManager.primaryColor,
|
||||
onPrimary: ColorsManager.onPrimaryColor,
|
||||
secondary: ColorsManager.secondaryColor,
|
||||
onSecondary: ColorsManager.onSecondaryColor,
|
||||
error: Colors.red,
|
||||
onError: Colors.white,
|
||||
onBackground: ColorsManager.textPrimaryColor,
|
||||
surface: Colors.white,
|
||||
onSurface: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s12,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
|
||||
///text theme
|
||||
textTheme: const TextTheme(
|
||||
///display
|
||||
displayLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s35,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s20,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
///title
|
||||
titleLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s48,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s30,
|
||||
fontWeight: FontsManager.bold,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s25,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
///body
|
||||
bodyLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s12,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
labelLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
),
|
||||
|
||||
labelLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
),
|
||||
///button theme
|
||||
// buttonTheme: ButtonThemeData(
|
||||
// buttonColor: ColorsManager.primaryLightColor,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: AppPadding.p8),
|
||||
// textTheme: ButtonTextTheme.primary,
|
||||
// hoverColor: ColorsManager.primaryDarkColor,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// ),),
|
||||
//
|
||||
// textButtonTheme: TextButtonThemeData(
|
||||
// style: ButtonStyle(
|
||||
// backgroundColor:
|
||||
// MaterialStateProperty.all<Color>(ColorsManager.primaryLightColor),
|
||||
// padding: MaterialStateProperty.all<EdgeInsets>(
|
||||
// const EdgeInsets.all(AppPadding.p8),),
|
||||
// textStyle: MaterialStateProperty.all<TextStyle>(
|
||||
// const TextStyle(
|
||||
// fontFamily: FontsManager.fontFamily,
|
||||
// fontSize: FontSize.s16,
|
||||
// fontWeight: FontsManager.regular,
|
||||
// color: ColorsManager.onPrimaryLightColor,
|
||||
// ),
|
||||
// ),
|
||||
// // shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||
// // RoundedRectangleBorder(
|
||||
// // borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// // side: const BorderSide(color: Colors.grey),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
///button theme
|
||||
// buttonTheme: ButtonThemeData(
|
||||
// buttonColor: ColorsManager.primaryLightColor,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: AppPadding.p8),
|
||||
// textTheme: ButtonTextTheme.primary,
|
||||
// hoverColor: ColorsManager.primaryDarkColor,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// ),),
|
||||
//
|
||||
// textButtonTheme: TextButtonThemeData(
|
||||
// style: ButtonStyle(
|
||||
// backgroundColor:
|
||||
// MaterialStateProperty.all<Color>(ColorsManager.primaryLightColor),
|
||||
// padding: MaterialStateProperty.all<EdgeInsets>(
|
||||
// const EdgeInsets.all(AppPadding.p8),),
|
||||
// textStyle: MaterialStateProperty.all<TextStyle>(
|
||||
// const TextStyle(
|
||||
// fontFamily: FontsManager.fontFamily,
|
||||
// fontSize: FontSize.s16,
|
||||
// fontWeight: FontsManager.regular,
|
||||
// color: ColorsManager.onPrimaryLightColor,
|
||||
// ),
|
||||
// ),
|
||||
// // shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||
// // RoundedRectangleBorder(
|
||||
// // borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// // side: const BorderSide(color: Colors.grey),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
///input decoration theme
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.grey),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: ColorsManager.primaryColor),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
color: Colors.grey,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
),
|
||||
),
|
||||
|
||||
///input decoration theme
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
///card theme
|
||||
//TODO edit card theme
|
||||
cardTheme: const CardTheme(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.grey),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: ColorsManager.primaryColor),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
color: Colors.grey,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
),
|
||||
),
|
||||
|
||||
///card theme
|
||||
//TODO edit card theme
|
||||
cardTheme: const CardTheme(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user