copyWith method
- @useResult
- TextStyle? headerTextStyle,
- FCalendarEntryStyle current()?,
- FCalendarEntryStyle enclosing()?,
- int? startDayOfWeek,
- double? tileSize,
Returns a copy of this FCalendarDayPickerStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
headerTextStyle
The text style for the day of th week headers.
current
The styles of dates in the current month.
enclosing
The styles of dates in the enclosing months.
startDayOfWeek
The starting day of the week. Defaults to the current locale's preferred starting day of the week if null.
Specifying startDayOfWeek
will override the current locale's preferred starting day of the week.
Contract
Throws AssertionError if:
startDayOfWeek
< DateTime.monday- DateTime.sunday <
startDayOfWeek
tileSize
The tile's size. Defaults to 42.
Contract
Throws AssertionError if tileSize
is not positive.
Implementation
@useResult
FCalendarDayPickerStyle copyWith({
TextStyle? headerTextStyle,
FCalendarEntryStyle Function(FCalendarEntryStyle)? current,
FCalendarEntryStyle Function(FCalendarEntryStyle)? enclosing,
int? startDayOfWeek,
double? tileSize,
}) => FCalendarDayPickerStyle(
headerTextStyle: headerTextStyle ?? this.headerTextStyle,
current: current != null ? current(this.current) : this.current,
enclosing: enclosing != null ? enclosing(this.enclosing) : this.enclosing,
startDayOfWeek: startDayOfWeek ?? this.startDayOfWeek,
tileSize: tileSize ?? this.tileSize,
);