MonthItem class
Displays the days of a given month and allows choosing a date range.
The days are arranged in a rectangular grid with one column for each day of the week.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MonthItem
Constructors
-
MonthItem({Key? key, required DateTime? selectedDateStart, required DateTime? selectedDateEnd, required DateTime currentDate, required ValueChanged<
DateTime> onChanged, required DateTime firstDate, required DateTime lastDate, required DateTime displayedMonth, DragStartBehavior dragStartBehavior = DragStartBehavior.start, Color? highLightColor, Color? selectedColor, TextStyle? selectedTextStyle, TextStyle? disabledTexStyle, bool showCurrentDay = true, Color? currentDayStrokeColor, double? itemHeight, Color? splashColor, double? spaceBetweenEachMonth, double? spaceBetweenRows, TextStyle? dayTextStyle, double? monthNameHeight, TextStyle? monthTextStyle}) - Creates a month item.
Properties
- currentDate → DateTime
-
The current date at the time the picker is displayed.
final
- currentDayStrokeColor → Color?
-
The current day gets a different text color and a circle stroke
border. This prop only shows effect when showCurrentDay is true.
final
- dayTextStyle → TextStyle?
-
The text style for all days. By default the text style
is
textTheme.bodyText2
.final - disabledTexStyle → TextStyle?
-
Text style for the disabled day items.
final
- displayedMonth → DateTime
-
The month whose days are displayed by this picker.
final
- dragStartBehavior → DragStartBehavior
-
Determines the way that drag start behavior is handled.
final
- firstDate → DateTime
-
The earliest date the user is permitted to pick.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highLightColor → Color?
-
The highlight color for the the selected dates
By default the color will be
colorScheme.primary
.final - itemHeight → double?
-
Item height of each day in month.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lastDate → DateTime
-
The latest date the user is permitted to pick.
final
- monthNameHeight → double?
-
Height of the month name widget.
final
- monthTextStyle → TextStyle?
-
Text style for month names.
final
-
onChanged
→ ValueChanged<
DateTime> -
Called when the user picks a day.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedColor → Color?
-
The color of the selected dates.
final
- selectedDateEnd → DateTime?
-
The currently selected end date.
final
- selectedDateStart → DateTime?
-
The currently selected start date.
final
- selectedTextStyle → TextStyle?
-
Text style for the selected day items.
final
- showCurrentDay → bool
-
Boolean to hide or show the selection of current date.
By default the value will be true.
final
- spaceBetweenEachMonth → double?
-
Space between each month. By default the height between each month
will be 12.
final
- spaceBetweenRows → double?
-
Space between rows.
final
- splashColor → Color?
-
The splash color for each day of the month. By default the
value will be ColorScheme.primary.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _MonthItemState -
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.
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