DesignCalendar class
One or more month grids over a DesignCalendarController.
DesignCalendar(controller: controller, dayBuilder: (context, day, states) => Text('${day.date.day}'))
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DesignCalendar
Constructors
-
DesignCalendar({Key? key, required DesignCalendarController controller, required DesignCalendarDayBuilder dayBuilder, Widget headerBuilder(BuildContext context, DesignCalendarHeader header)?, Widget weekdayBuilder(BuildContext context, int weekday, String label)?, Widget monthsBuilder(BuildContext context, List<
Widget> months)?, int months = 1, int? firstWeekday, ValueChanged<DateTime> ? onChanged, FocusNode? focusNode, bool autofocus = false, String dayLabel(DateTime day)?, String monthLabel(DateTime day)?, String weekdayLabel(int weekday)?, bool showOutsideDays = true, double minDayWidth = 0}) -
A calendar over
controller.const
Properties
- autofocus → bool
-
Whether the grid takes focus when it first appears.
final
- controller → DesignCalendarController
-
The model: the shown month, the keyboard's day and the selection.
The caller makes it, keeps it across
rebuilds and disposes it.
final
- dayBuilder → DesignCalendarDayBuilder
-
Paints a day.
final
- dayLabel → String Function(DateTime day)?
-
A day's name for a screen reader; null:
DesignLocalizations.formatFullDate.
final
- firstWeekday → int?
-
The day a week starts on (DateTime.monday … DateTime.sunday). Null
takes it from DesignLocalizations.firstDayOfWeek, as
CalendarDatePickertakes it from its localizations.final - focusNode → FocusNode?
-
The grid's one focus.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerBuilder → Widget Function(BuildContext context, DesignCalendarHeader header)?
-
Paints a month's header; null shows its label.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minDayWidth → double
-
A day's least width, its touch target: where seven do not fit the
month's width, each day keeps it and overhangs its seventh, centred
(Compose's
minimumInteractiveComponentSize). 0, the default, keeps each day to its seventh.final - monthLabel → String Function(DateTime day)?
-
A month's name; null:
DesignLocalizations.formatMonthYear.
final
- months → int
-
How many months show at once (two for a range picker on a wide
screen).
final
-
monthsBuilder
→ Widget Function(BuildContext context, List<
Widget> months)? -
Lays out the months side by side or stacked; null puts them in a row.
final
-
onChanged
→ ValueChanged<
DateTime> ? -
Called with the day a press or Enter chose, after controller took
it: the controller holds what it made of it (a date, a range's end, a
day added or taken away).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showOutsideDays → bool
-
Whether days of the neighbouring months fill the first and last weeks
(they cannot be focused by a screen reader's swipe and read as such).
final
- weekdayBuilder → Widget Function(BuildContext context, int weekday, String label)?
-
Paints a weekday's heading (DateTime.monday …).
final
- weekdayLabel → String Function(int weekday)?
-
A weekday's short heading; null:
DesignLocalizations.formatShortWeekday.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DesignCalendar> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited