mobileTheme property
ThemeData
mobileTheme
Implementation
ThemeData get mobileTheme {
const Border(top: BorderSide());
return ThemeData(
colorScheme: colorScheme,
scaffoldBackgroundColor: colorScheme.background,
textTheme: mobileTypography.textTheme,
appBarTheme: const AppBarTheme(elevation: 0),
elevatedButtonTheme: elevatedButtonTheme,
outlinedButtonTheme: outlinedButtonTheme,
textButtonTheme: textButtonTheme,
cardTheme: cardTheme,
inputDecorationTheme: inputDecorationTheme,
dialogTheme: dialogTheme,
textSelectionTheme: TextSelectionThemeData(
cursorColor: const DigitColors().light.primaryOrange,
selectionColor: const DigitColors().light.primaryOrangeBg,
selectionHandleColor: const DigitColors().transparent,
),
datePickerTheme: DatePickerThemeData(
headerHeadlineStyle: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
fontFamily: 'Roboto-bold',
),
headerHelpStyle: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
fontFamily: 'Roboto-bold',
),
headerBackgroundColor: const DigitColors().light.paperPrimary,
headerForegroundColor: const DigitColors().light.textPrimary,
backgroundColor: const DigitColors().light.paperPrimary,
),
timePickerTheme: TimePickerThemeData(
backgroundColor: const DigitColors().light.paperPrimary,
hourMinuteShape: RoundedRectangleBorder(
borderRadius: const BorderRadius.all(Radius.circular(4)),
side: BorderSide(
color: const DigitColors().light.primaryOrange, width: 1),
),
dayPeriodBorderSide: BorderSide(
color: const DigitColors().light.primaryOrange, width: 1),
dayPeriodColor: MaterialStateColor.resolveWith(
(states) => states.contains(MaterialState.selected)
? const DigitColors().light.primaryOrange
: const DigitColors().transparent,
),
dayPeriodTextColor: MaterialStateColor.resolveWith((states) =>
states.contains(MaterialState.selected)
? const DigitColors().light.paperPrimary
: const DigitColors().light.textPrimary),
dayPeriodShape: RoundedRectangleBorder(
borderRadius: const BorderRadius.all(Radius.circular(1)),
side: BorderSide(
color: const DigitColors().light.primaryOrange, width: 1),
),
hourMinuteColor: MaterialStateColor.resolveWith(
(states) => states.contains(MaterialState.selected)
? const DigitColors().light.primaryOrange
: const DigitColors().transparent,
),
hourMinuteTextColor: MaterialStateColor.resolveWith((states) =>
states.contains(MaterialState.selected)
? const DigitColors().light.paperPrimary
: const DigitColors().light.textPrimary),
dialHandColor: const DigitColors().light.primaryOrange,
dialBackgroundColor: const DigitColors().light.primaryOrangeBg,
hourMinuteTextStyle:
const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
dayPeriodTextStyle:
const TextStyle(fontSize: 12, fontWeight: FontWeight.bold),
helpTextStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
fontFamily: 'Roboto-bold',
color: const DigitColors().light.textPrimary),
inputDecorationTheme: const InputDecorationTheme(
border: InputBorder.none,
contentPadding: EdgeInsets.all(0),
),
dialTextColor: MaterialStateColor.resolveWith(
(states) => const DigitColors().light.textPrimary,
),
entryModeIconColor: const DigitColors().light.primaryOrange,
cancelButtonStyle: ButtonStyle(
textStyle: MaterialStateProperty.resolveWith<TextStyle>(
(Set<MaterialState> states) {
return TextStyle(
fontFamily: 'Roboto',
fontWeight: FontWeight.w500,
fontSize: 19,
color: const DigitColors().light.primaryOrange,
);
}),
),
confirmButtonStyle: ButtonStyle(
textStyle: MaterialStateProperty.resolveWith<TextStyle>(
(Set<MaterialState> states) {
return TextStyle(
fontFamily: 'Roboto',
fontWeight: FontWeight.w500,
fontSize: 19,
color: const DigitColors().light.primaryOrange,
);
}),
),
),
);
}