HorizontalDatePickerWidget class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- HorizontalDatePickerWidget
Constructors
-
HorizontalDatePickerWidget({required DateTime startDate, required DateTime endDate, required DateTime selectedDate, required double widgetWidth, required DatePickerController datePickerController, List<
DateItem> dateItemComponentList = const <DateItem>[DateItem.Month, DateItem.Day, DateItem.WeekDay], String? locale, double width = 60, double height = 80, void onValueSelected(DateTime value)?, Color normalColor = Colors.white, Color selectedColor = Colors.black, Color disabledColor = Colors.white, Color normalTextColor = Colors.black, Color selectedTextColor = Colors.white, Color disabledTextColor = const Color(0xFFBDBDBD), double monthFontSize = 12, double dayFontSize = 18, double weekDayFontSize = 12}) - Main widget part of this library. It is a horizontal date picker that always make the selected option to center.
Properties
-
dateItemComponentList
→ List<
DateItem> -
Date item display setting
default set as month, day, day of week, from top to bottom
at least one info must be in the list
final
- datePickerController → DatePickerController
-
controller controls the visible position of the picker
this controller will share both internal and external use
this is required
final
- dayFontSize → double
-
fontsize of the day label
final
- disabledColor → Color
-
background color of a disabled date(date that out of the range) item
final
- disabledTextColor → Color
-
text color of a disabled date(date that out of the range) item
final
- endDate → DateTime
-
picker end date
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
whole widget's height
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → String
-
final
- monthFontSize → double
-
Date item color and fontsize
fontsize of the month label
final
- normalColor → Color
-
background color of a date item
final
- normalTextColor → Color
-
text color of a date item
final
- onValueSelected → (void Function(DateTime value)?)
-
callback when a new date selected
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedColor → Color
-
background color of a selected date item
final
- selectedDate → DateTime
-
default selected date
final
- selectedTextColor → Color
-
text color of a selected date item
final
- startDate → DateTime
-
picker start date
final
- weekDayFontSize → double
-
fontsize of the day of week label
final
- widgetWidth → double
-
whole widget's width
final
- width → double
-
each date item width
if the width is not able to fill the widget's width,
padding will auto append to each item evenly
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _HorizontalDatePickerWidgetState -
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