HorizontalView class
A horizontally scrollable calendar widget that shows a month's days in a single row. The widget supports marking days, custom cell widgets/decoration and an optional month/year picker header.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- HorizontalView
Constructors
- HorizontalView({Key? key, BoxDecoration? decoration, BoxDecoration? userPickedDecoration, Widget? defaultChild, Widget? userPickedChild, required bool showMonthYearPicker, TextStyle? headerTextStyle, Color? headerIconColor, double? headerHeight, Color? monthYearPickerSelectedMonthColor, Color? monthYearPickerUnselectedMonthColor, int? monthYearPickerCrossAxisCount, double? monthYearPickerChildAspectRatio, BoxDecoration? monthYearPickerMonthItemDecoration, bool showWeekDays = true, TextStyle? dateTextStyle, TextStyle? weekDaysTextStyle, TextStyle? selectedDateTextStyle, TextStyle? selectedWeekDaysTextStyle, DateTime? endDate, DateTime? initialDate, bool autoScroll = true})
-
Creates a new instance of the HorizontalView widget.
const
- HorizontalView.defaults({Key? key, BoxDecoration? decoration, BoxDecoration? userPickedDecoration, Widget? defaultChild, Widget? userPickedChild, required bool showMonthYearPicker, TextStyle? headerTextStyle, Color? headerIconColor, double? headerHeight, Color? monthYearPickerSelectedMonthColor, Color? monthYearPickerUnselectedMonthColor, int? monthYearPickerCrossAxisCount, double? monthYearPickerChildAspectRatio, BoxDecoration? monthYearPickerMonthItemDecoration, bool showWeekDays = true, TextStyle? dateTextStyle, TextStyle? weekDaysTextStyle, TextStyle? selectedDateTextStyle, TextStyle? selectedWeekDaysTextStyle})
-
Creates a new instance of the HorizontalView widget with default values.
factory
Properties
- autoScroll → bool
-
If true the view will automatically scroll to initialDate when
first built. Defaults to
truebut can be set tofalseto let external layout or controllers manage initial offset.final - dateTextStyle → TextStyle?
-
Text style used for the date number in non-selected cells.
final
- decoration → BoxDecoration?
-
Decoration applied to non-selected date cells.
final
- defaultChild → Widget?
-
Optional widget used for unselected date cells. If null a default
vertically stacked day + weekday layout is used.
final
- endDate → DateTime?
-
Optional last selectable date. Dates after this will be considered
unselectable.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerHeight → double?
-
Height used by the month/year picker when displayed.
final
- headerIconColor → Color?
-
Color used for header navigation icons.
final
- headerTextStyle → TextStyle?
-
Style applied to the header text in the month/year picker.
final
- initialDate → DateTime?
-
Optional date to scroll to on first build (if autoScroll is true).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- monthYearPickerChildAspectRatio → double?
-
Child aspect ratio used for month tiles in the picker grid.
final
- monthYearPickerCrossAxisCount → int?
-
Number of columns used when showing months in the picker grid.
final
- monthYearPickerMonthItemDecoration → BoxDecoration?
-
Decoration applied to each month item inside the month picker.
final
- monthYearPickerSelectedMonthColor → Color?
-
Color used for the selected month item in the month picker.
final
- monthYearPickerUnselectedMonthColor → Color?
-
Color used for unselected month items in the month picker.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedDateTextStyle → TextStyle?
-
Text style used for the date number in the selected cell.
final
- selectedWeekDaysTextStyle → TextStyle?
-
Text style used for the weekday label in the selected cell.
final
- showMonthYearPicker → bool
-
Whether to show the month/year picker header above the list.
final
- showWeekDays → bool
-
Whether to display the weekday labels under each date.
final
- userPickedChild → Widget?
-
Optional widget used for the selected date cell.
final
- userPickedDecoration → BoxDecoration?
-
Decoration applied to the currently selected date cell.
final
- weekDaysTextStyle → TextStyle?
-
Text style used for the weekday label in non-selected cells.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< HorizontalView> -
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, 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