Implementation
ThemeData myLightTheme = ThemeData(
useMaterial3: false,
brightness: Brightness.light,
primaryColor: MyColorsTheme.primary,
primaryColorDark: MyColorsTheme.primaryDark,
// primaryColorLight: ,
colorScheme: _lightColorScheme,
scaffoldBackgroundColor: MyColorsTheme.lightBackground,
dialogBackgroundColor: MyColorsTheme.lightBackground,
cardColor: Colors.white,
disabledColor: Colors.grey,
dividerColor: Colors.grey.shade300,
// --- Typography ---
textTheme: const TextTheme(
displayLarge: TextStyle(
fontSize: 57,
fontWeight: FontWeight.bold,
color: MyColorsTheme.lightTextPrimary),
displayMedium: TextStyle(
fontSize: 45,
fontWeight: FontWeight.w500,
color: MyColorsTheme.lightTextPrimary),
displaySmall: TextStyle(
fontSize: 36,
fontWeight: FontWeight.w400,
color: MyColorsTheme.lightTextPrimary),
headlineLarge: TextStyle(
fontSize: 32,
fontWeight: FontWeight.w600,
color: MyColorsTheme.lightTextPrimary),
headlineMedium: TextStyle(
fontSize: 28,
fontWeight: FontWeight.w500,
color: MyColorsTheme.lightTextPrimary),
headlineSmall: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w500,
color: MyColorsTheme.lightTextPrimary),
titleLarge: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w600,
color: MyColorsTheme.lightTextPrimary),
titleMedium: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: MyColorsTheme.lightTextPrimary),
titleSmall: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: MyColorsTheme.lightTextPrimary),
bodyLarge: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w400,
color: MyColorsTheme.lightTextPrimary),
bodyMedium: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
color: MyColorsTheme.lightTextPrimary),
bodySmall: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: MyColorsTheme.lightTextPrimary),
labelLarge: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: MyColorsTheme.lightTextPrimary),
labelMedium: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: MyColorsTheme.lightTextPrimary),
labelSmall: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w400,
color: MyColorsTheme.lightTextPrimary),
),
// --- AppBar ---
appBarTheme: const AppBarTheme(
elevation: 0,
// centetle: true,
backgroundColor: Colors.white,
iconTheme: IconThemeData(color: MyColorsTheme.primary),
titleTextStyle: TextStyle(
color: MyColorsTheme.lightTextPrimary,
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
// --- Cards ---
cardTheme: CardThemeData(
color: Colors.white,
elevation: 2,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
// --- Buttons ---
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: MyColorsTheme.primary,
foregroundColor: Colors.white,
minimumSize: const Size(double.infinity, 55),
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
minimumSize: const Size(double.infinity, 55),
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
),
),
textButtonTheme: TextButtonThemeData(
style: OutlinedButton.styleFrom(
minimumSize: const Size(double.minPositive, 55),
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
),
),
// --- Inputs ---
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: Colors.grey.shade50,
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
hintStyle: const TextStyle(
color: MyColorsTheme.lightTextSecondary,
fontSize: 14,
),
labelStyle: const TextStyle(
color: MyColorsTheme.lightTextSecondary,
fontSize: 14,
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide.none,
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(color: Colors.grey.shade300),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: MyColorsTheme.primary, width: 1.5),
),
),
// --- Radio Buttons ---
radioTheme: RadioThemeData(
fillColor: WidgetStateProperty.all(MyColorsTheme.primary),
),
// --- Chips ---
chipTheme: ChipThemeData(
backgroundColor: Colors.grey.shade100,
secondarySelectedColor: MyColorsTheme.primary,
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
labelStyle:
const TextStyle(fontSize: 12, color: MyColorsTheme.lightTextPrimary),
),
// --- Bottom Navigation ---
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
backgroundColor: Colors.white,
selectedItemColor: MyColorsTheme.primary,
unselectedItemColor: Colors.grey,
showUnselectedLabels: true,
type: BottomNavigationBarType.fixed,
),
);