WeekdayIndicatorStyle constructor
WeekdayIndicatorStyle(
- BuildContext context,
- DateTime date, {
- Decoration? decoration,
- EdgeInsetsGeometry? padding,
- TextStyle? textStyle,
- String? label,
Implementation
factory WeekdayIndicatorStyle(
BuildContext context,
DateTime date, {
Decoration? decoration,
EdgeInsetsGeometry? padding,
TextStyle? textStyle,
String? label,
}) {
assert(date.debugCheckIsValidTimetableDate());
final theme = context.theme;
return WeekdayIndicatorStyle.raw(
decoration: decoration ?? const BoxDecoration(),
padding: padding ?? EdgeInsets.zero,
textStyle: textStyle ??
theme.textTheme.bodySmall!.copyWith(
color: date.isToday
? theme.colorScheme.primary
: theme.colorScheme.background.mediumEmphasisOnColor,
),
label: label ??
() {
context.dependOnTimetableLocalizations();
return DateFormat('EEE').format(date);
}(),
);
}