FluentCalendarStyle class
The visual configuration of a FluentCalendar.
Shaped like FluentButtonStyle: every visual property is a
WidgetStateProperty, so hover, pressed and disabled values live on the
property rather than being branched on at build time.
Every field is nullable and means "inherit". Resolution order, lowest to highest precedence:
- the view defaults derived from the theme
- the nearest
FluentCalendarTheme - the widget's own
style
Three cell colour families, not one
A day cell has three mutually exclusive roles — selected, today, and
ordinary — and upstream gives each its own ramp rather than one ramp with a
selected mode. Folding them into a single property would mean either
inventing values or writing a bespoke precedence helper; keeping them apart
means the renderer picks the family by role and plain
FluentStateColor.tokens resolves hover and pressed inside it. A hovered
selected day therefore resolves selectedBackgroundColor with
WidgetState.hovered in the set and lands on the right token with no
special case.
This is FluentDataGridStyle's own argument applied one level down.
- Annotations
Constructors
-
FluentCalendarStyle({WidgetStateProperty<
Color?> ? backgroundColor, WidgetStateProperty<Color?> ? borderColor, WidgetStateProperty<double?> ? borderWidth, WidgetStateProperty<BorderRadius?> ? borderRadius, WidgetStateProperty<List< ? shadow, WidgetStateProperty<BoxShadow> ?>EdgeInsetsGeometry?> ? padding, WidgetStateProperty<double?> ? gap, WidgetStateProperty<Color?> ? dividerColor, WidgetStateProperty<double?> ? dividerWidth, WidgetStateProperty<TextStyle?> ? headerTextStyle, WidgetStateProperty<Color?> ? headerForegroundColor, WidgetStateProperty<Color?> ? headerBackgroundColor, WidgetStateProperty<EdgeInsetsGeometry?> ? headerPadding, WidgetStateProperty<BorderRadius?> ? headerBorderRadius, WidgetStateProperty<double?> ? headerHeight, WidgetStateProperty<TextStyle?> ? weekdayTextStyle, WidgetStateProperty<Color?> ? weekdayForegroundColor, WidgetStateProperty<Size?> ? cellSize, WidgetStateProperty<double?> ? cellSpacing, WidgetStateProperty<double?> ? rowSpacing, WidgetStateProperty<Size?> ? dayButtonSize, WidgetStateProperty<BorderRadius?> ? cellBorderRadius, WidgetStateProperty<TextStyle?> ? cellTextStyle, WidgetStateProperty<Color?> ? cellBackgroundColor, WidgetStateProperty<Color?> ? cellForegroundColor, WidgetStateProperty<Color?> ? outOfPageForegroundColor, WidgetStateProperty<Color?> ? todayBackgroundColor, WidgetStateProperty<Color?> ? todayForegroundColor, WidgetStateProperty<Size?> ? todayMarkerSize, WidgetStateProperty<Color?> ? selectedBackgroundColor, WidgetStateProperty<Color?> ? selectedForegroundColor, WidgetStateProperty<Color?> ? selectedBorderColor, WidgetStateProperty<double?> ? selectedBorderWidth, WidgetStateProperty<TextStyle?> ? goToTodayTextStyle, WidgetStateProperty<Color?> ? goToTodayForegroundColor, WidgetStateProperty<MouseCursor?> ? mouseCursor}) -
Creates a style. Omitted properties inherit.
const
Properties
-
backgroundColor
→ WidgetStateProperty<
Color?> ? -
Fill behind the whole calendar.
final
-
borderColor
→ WidgetStateProperty<
Color?> ? -
Colour of the rule around the calendar.
final
-
borderRadius
→ WidgetStateProperty<
BorderRadius?> ? -
Corner radius of the calendar surface.
final
-
borderWidth
→ WidgetStateProperty<
double?> ? -
Thickness of the rule around the calendar.
final
-
cellBackgroundColor
→ WidgetStateProperty<
Color?> ? -
Fill of an ordinary cell — neither selected nor today.
final
-
cellBorderRadius
→ WidgetStateProperty<
BorderRadius?> ? -
Corner radius of a cell's painted surface.
final
-
cellForegroundColor
→ WidgetStateProperty<
Color?> ? -
Label colour of an ordinary cell.
final
-
cellSize
→ WidgetStateProperty<
Size?> ? -
The grid slot one cell occupies, spacing excluded.
final
-
cellSpacing
→ WidgetStateProperty<
double?> ? -
Horizontal space between grid slots. Zero in the month view, where the
day cells tile edge to edge and their own padding provides the gap.
final
-
cellTextStyle
→ WidgetStateProperty<
TextStyle?> ? -
Type ramp of a cell's label. Its colour is overridden by the foreground
property of whichever role the cell is in.
final
-
dayButtonSize
→ WidgetStateProperty<
Size?> ? -
Edge lengths of the painted surface inside a month-view day cell.
final
-
dividerColor
→ WidgetStateProperty<
Color?> ? -
Colour of the rule between two panels.
final
-
dividerWidth
→ WidgetStateProperty<
double?> ? -
Thickness of the rule between two panels.
final
-
gap
→ WidgetStateProperty<
double?> ? -
Space between the header row and the grid below it.
final
-
goToTodayForegroundColor
→ WidgetStateProperty<
Color?> ? -
Colour of the "go to today" link.
final
-
goToTodayTextStyle
→ WidgetStateProperty<
TextStyle?> ? -
Type ramp of the "go to today" link. Its colour is overridden by
goToTodayForegroundColor.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
headerBackgroundColor
→ WidgetStateProperty<
Color?> ? -
Caption fill. Transparent at rest — the caption only reads as a button
once it is hovered.
final
-
headerBorderRadius
→ WidgetStateProperty<
BorderRadius?> ? -
Corner radius of the caption button.
final
-
headerForegroundColor
→ WidgetStateProperty<
Color?> ? -
Caption colour.
final
-
headerHeight
→ WidgetStateProperty<
double?> ? -
Height of the header row, chevrons included.
final
-
headerPadding
→ WidgetStateProperty<
EdgeInsetsGeometry?> ? -
Inset inside the caption button. Asymmetric upstream: the caption is
inset further from the left edge than from the chevrons it sits beside.
final
-
headerTextStyle
→ WidgetStateProperty<
TextStyle?> ? -
Type ramp of the caption —
March 2026,2026,2020 - 2031. Its colour is overridden by headerForegroundColor.final -
mouseCursor
→ WidgetStateProperty<
MouseCursor?> ? -
Cursor over a selectable cell.
final
-
Chevron button fill.
final
-
Corner radius of a chevron button.
final
-
Chevron glyph colour. Null when the chevron is out of bounds resolves
through WidgetState.disabled, not by hiding the button — upstream keeps
it in the tab order so focus is not lost when it becomes disabled after a
click.
final
-
Edge lengths of a previous/next chevron button.
final
-
Edge length of the chevron glyph inside its button.
final
-
outOfPageForegroundColor
→ WidgetStateProperty<
Color?> ? -
Label colour of a cell belonging to an adjacent month or decade.
final
-
padding
→ WidgetStateProperty<
EdgeInsetsGeometry?> ? -
Inset between the calendar surface and its header and grid.
final
-
rowSpacing
→ WidgetStateProperty<
double?> ? -
Vertical space between grid rows. Upstream sets this independently of
cellSpacing in the year and decade views, so the two are separate.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedBackgroundColor
→ WidgetStateProperty<
Color?> ? -
Fill of the selected cell.
final
-
selectedBorderColor
→ WidgetStateProperty<
Color?> ? -
Colour of the ring around the selected cell. Upstream draws this in
addition to the fill, so a selected day survives high contrast where the
fill flattens.
final
-
selectedBorderWidth
→ WidgetStateProperty<
double?> ? -
Thickness of the ring around the selected cell.
final
-
selectedForegroundColor
→ WidgetStateProperty<
Color?> ? -
Label colour of the selected cell.
final
-
shadow
→ WidgetStateProperty<
List< ?BoxShadow> ?> -
Elevation cast by the calendar surface.
final
-
todayBackgroundColor
→ WidgetStateProperty<
Color?> ? -
Fill of the marker drawn behind today's label.
final
-
todayForegroundColor
→ WidgetStateProperty<
Color?> ? -
Label colour of today.
final
-
todayMarkerSize
→ WidgetStateProperty<
Size?> ? -
Edge lengths of the circular marker behind today's label. Smaller than
dayButtonSize — upstream draws a disc inside the button, not a filled
square.
final
-
weekdayForegroundColor
→ WidgetStateProperty<
Color?> ? -
Weekday header colour.
final
-
weekdayTextStyle
→ WidgetStateProperty<
TextStyle?> ? -
Type ramp of the weekday header row. Its colour is overridden by
weekdayForegroundColor.
final
Methods
-
copyWith(
{WidgetStateProperty< Color?> ? backgroundColor, WidgetStateProperty<Color?> ? borderColor, WidgetStateProperty<double?> ? borderWidth, WidgetStateProperty<BorderRadius?> ? borderRadius, WidgetStateProperty<List< ? shadow, WidgetStateProperty<BoxShadow> ?>EdgeInsetsGeometry?> ? padding, WidgetStateProperty<double?> ? gap, WidgetStateProperty<Color?> ? dividerColor, WidgetStateProperty<double?> ? dividerWidth, WidgetStateProperty<TextStyle?> ? headerTextStyle, WidgetStateProperty<Color?> ? headerForegroundColor, WidgetStateProperty<Color?> ? headerBackgroundColor, WidgetStateProperty<EdgeInsetsGeometry?> ? headerPadding, WidgetStateProperty<BorderRadius?> ? headerBorderRadius, WidgetStateProperty<double?> ? headerHeight, WidgetStateProperty<TextStyle?> ? weekdayTextStyle, WidgetStateProperty<Color?> ? weekdayForegroundColor, WidgetStateProperty<Size?> ? cellSize, WidgetStateProperty<double?> ? cellSpacing, WidgetStateProperty<double?> ? rowSpacing, WidgetStateProperty<Size?> ? dayButtonSize, WidgetStateProperty<BorderRadius?> ? cellBorderRadius, WidgetStateProperty<TextStyle?> ? cellTextStyle, WidgetStateProperty<Color?> ? cellBackgroundColor, WidgetStateProperty<Color?> ? cellForegroundColor, WidgetStateProperty<Color?> ? outOfPageForegroundColor, WidgetStateProperty<Color?> ? todayBackgroundColor, WidgetStateProperty<Color?> ? todayForegroundColor, WidgetStateProperty<Size?> ? todayMarkerSize, WidgetStateProperty<Color?> ? selectedBackgroundColor, WidgetStateProperty<Color?> ? selectedForegroundColor, WidgetStateProperty<Color?> ? selectedBorderColor, WidgetStateProperty<double?> ? selectedBorderWidth, WidgetStateProperty<TextStyle?> ? goToTodayTextStyle, WidgetStateProperty<Color?> ? goToTodayForegroundColor, WidgetStateProperty<MouseCursor?> ? mouseCursor}) → FluentCalendarStyle - This style with the given properties replaced.
-
merge(
FluentCalendarStyle? other) → FluentCalendarStyle -
This style with the non-null properties of
otherlayered on top. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
from(
{Color? backgroundColor, Color? borderColor, double? borderWidth, BorderRadius? borderRadius, List< BoxShadow> ? shadow, EdgeInsetsGeometry? padding, double? gap, Color? dividerColor, double? dividerWidth, TextStyle? headerTextStyle, Color? headerForegroundColor, Color? headerBackgroundColor, EdgeInsetsGeometry? headerPadding, BorderRadius? headerBorderRadius, double? headerHeight, TextStyle? weekdayTextStyle, Color? weekdayForegroundColor, Size? cellSize, double? cellSpacing, double? rowSpacing, Size? dayButtonSize, BorderRadius? cellBorderRadius, TextStyle? cellTextStyle, Color? cellBackgroundColor, Color? cellForegroundColor, Color? outOfPageForegroundColor, Color? todayBackgroundColor, Color? todayForegroundColor, Size? todayMarkerSize, Color? selectedBackgroundColor, Color? selectedForegroundColor, Color? selectedBorderColor, double? selectedBorderWidth, TextStyle? goToTodayTextStyle, Color? goToTodayForegroundColor, MouseCursor? mouseCursor}) → FluentCalendarStyle - Convenience for the common case of one value across every state.