WeekdaySelector class

The WeekdaySelector displays buttons that correspond to weekdays and lets the user select some of these weekdays.

Requires one of its ancestors to be a Material widget.

Inheritance

Constructors

WeekdaySelector({Key? key, required ValueChanged<int>? onChanged, required List<bool?> values, List<String> shortWeekdays = defaultShortWeekdays, List<String> weekdays = defaultWeekdays, int firstDayOfWeek = defaultFirstDayOfWeek, TextDirection textDirection = defaultTextDirection, Set<int> displayedDays = defaultDisplayedDays, bool? enableFeedback, Color? color, Color? selectedColor, Color? disabledColor, Color? fillColor, Color? selectedFillColor, Color? disabledFillColor, double? elevation, double? selectedElevation, double? disabledElevation, Color? focusColor, Color? selectedFocusColor, Color? hoverColor, Color? selectedHoverColor, Color? splashColor, Color? selectedSplashColor, TextStyle? textStyle, TextStyle? selectedTextStyle, TextStyle? disabledTextStyle, ShapeBorder? shape, ShapeBorder? selectedShape, ShapeBorder? disabledShape})

Properties

color Color?
The color for descendant Text widgets if the day is enabled.
final
disabledColor Color?
The color for descendant Text widgets if the day is enabled.
final
disabledElevation double?
The elevation of the button when the day is disabled.
final
disabledFillColor Color?
The background color of the day button if the day is disabled.
final
disabledShape ShapeBorder?
The shape of the disabled day button's Material.
final
disabledTextStyle TextStyle?
The text style of the button's text if the day is disabled.
final
displayedDays Set<int>
Which days are rendered in the weekday selector.
final
elevation double?
The elevation of the button when the day is enabled.
final
enableFeedback bool?
Whether detected gestures should provide acoustic and/or haptic feedback.
final
fillColor Color?
The background color of the day button if the day is enabled.
final
firstDayOfWeek int
The first day of the week, i.e. index 1 is Monday (DateTime.monday's value is 1).
final
focusColor Color?
The background color of the day button if the day is enabled.
final
hashCode int
The hash code for this object.
no setterinherited
hoverColor Color?
The color for the button's Material when a pointer is hovering over it and the day is enabled.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged ValueChanged<int>?
Called when the user taps on a day.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedColor Color?
The color for descendant Text widgets if the day is selected.
final
selectedElevation double?
The elevation of the button when the day is selected.
final
selectedFillColor Color?
The background color of the day button if the day is selected.
final
selectedFocusColor Color?
The focus color of the day button if the day is selected.
final
selectedHoverColor Color?
The color for the button's Material when a pointer is hovering over it and the day is selected.
final
selectedShape ShapeBorder?
The shape of the selected day button's Material.
final
selectedSplashColor Color?
The splash color for the button's InkWell if the day is selected.
final
selectedTextStyle TextStyle?
The text style of the button's text if the day is selected.
final
shape ShapeBorder?
The shape of the enabled day button's Material.
final
shortWeekdays List<String>
Very short names for days of the week, starting with Sunday, e.g. 'S'.
final
splashColor Color?
The splash color for the button's InkWell if the day is enabled.
final
textDirection TextDirection
The text direction to be used when creating the day buttons.
final
textStyle TextStyle?
The text style of the button's text if the day is not selected.
final
values List<bool?>
The corresponding selection state of each day.
final
weekdays List<String>
The days of the week, starting with Sunday, e.g. 'Sunday'.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
buildButtonWith(int value) Widget
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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.
inherited
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}) 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