lightTheme property
ThemeData
get
lightTheme
Implementation
static ThemeData get lightTheme {
const cs = _lightColorScheme;
final textTheme = _buildTextTheme(ThemeData.light().textTheme);
return ThemeData(
useMaterial3: true,
colorScheme: cs,
brightness: Brightness.light,
textTheme: textTheme,
scaffoldBackgroundColor: cs.surface,
appBarTheme: AppBarTheme(
elevation: 0,
scrolledUnderElevation: 0,
backgroundColor: cs.surface,
foregroundColor: cs.onSurface,
surfaceTintColor: Colors.transparent,
titleTextStyle: GoogleFonts.manrope(
color: cs.onSurface,
fontSize: 18,
fontWeight: FontWeight.w600,
letterSpacing: -0.3,
),
),
cardTheme: CardThemeData(
elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
color: cs.surfaceContainerLowest,
surfaceTintColor: Colors.transparent,
margin: EdgeInsets.zero,
),
dividerTheme: const DividerThemeData(
color: Colors.transparent,
thickness: 0,
space: 8,
),
navigationRailTheme: NavigationRailThemeData(
backgroundColor: cs.primary,
elevation: 0,
indicatorColor: Colors.white.withAlpha(25),
selectedIconTheme: const IconThemeData(color: Colors.white),
unselectedIconTheme: IconThemeData(color: Colors.white.withAlpha(180)),
),
drawerTheme: DrawerThemeData(
backgroundColor: cs.primary,
surfaceTintColor: Colors.transparent,
elevation: 2,
),
listTileTheme: ListTileThemeData(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
horizontalTitleGap: 12,
minLeadingWidth: 24,
contentPadding: const EdgeInsets.symmetric(horizontal: 12),
dense: true,
visualDensity: VisualDensity.compact,
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: cs.surfaceContainerHighest,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide.none,
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide.none,
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(color: cs.secondary, width: 2),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(color: cs.error),
),
contentPadding: const EdgeInsets.symmetric(
horizontal: 14,
vertical: 12,
),
isDense: true,
),
filledButtonTheme: FilledButtonThemeData(
style: FilledButton.styleFrom(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14),
textStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: 0.2,
),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
side: BorderSide(color: cs.outlineVariant.withAlpha(50)),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14),
textStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: 0.2,
),
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
),
),
dataTableTheme: DataTableThemeData(
headingRowColor: WidgetStateProperty.all(cs.surfaceContainerLow),
headingTextStyle: GoogleFonts.inter(
fontWeight: FontWeight.w600,
fontSize: 12,
color: cs.onSurfaceVariant,
letterSpacing: 0.5,
),
dataTextStyle: GoogleFonts.inter(fontSize: 13, color: cs.onSurface),
dividerThickness: 0,
),
chipTheme: ChipThemeData(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
side: BorderSide.none,
labelStyle: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w500,
),
),
dialogTheme: DialogThemeData(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
backgroundColor: cs.surfaceContainerLowest,
surfaceTintColor: Colors.transparent,
),
bottomSheetTheme: BottomSheetThemeData(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
),
backgroundColor: cs.surfaceContainerLowest,
surfaceTintColor: Colors.transparent,
),
tabBarTheme: TabBarThemeData(
indicatorColor: cs.secondary,
labelColor: cs.secondary,
unselectedLabelColor: cs.onSurfaceVariant,
indicatorSize: TabBarIndicatorSize.label,
labelStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w600,
),
unselectedLabelStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
popupMenuTheme: PopupMenuThemeData(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
color: cs.surfaceContainerLowest,
surfaceTintColor: Colors.transparent,
),
snackBarTheme: SnackBarThemeData(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
behavior: SnackBarBehavior.floating,
backgroundColor: cs.inverseSurface,
contentTextStyle: GoogleFonts.inter(color: cs.onInverseSurface),
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: cs.secondary,
foregroundColor: cs.onSecondary,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
),
);
}