CalendarView class

日历widget

Inheritance

Constructors

CalendarView({Key? key, Map<String, dynamic>? dateMap, Color? titleColor, IconData? previousIconData, IconData? nextIconData, Color? selectedColor, Color? subTitleDisableColor, Color? subTitleEnableColor, Color? subTitleFutureColor, required dynamic onSelectedDateTime(bool, DateTime), DateTime? currentDateTime, bool showExpandMore = false, required DateTime startDateTime, required DateTime endDateTime, EdgeInsets? insets, String? previousTitle, String? nextTitle, CalendarMode? defaultMode = CalendarMode.month, DateFormat? format = DateFormat.y_m, ControlAlign? align = ControlAlign.bottom, Color? iconColor})

Properties

align ControlAlign?
上一月/下一月按钮位置
final
currentDateTime DateTime?
默认选中日期
final
dateMap Map<String, dynamic>?
需标记日期map---key为日期YYYY-mm-dd value为标记描述
final
defaultMode CalendarMode?
默认日历样式
final
endDateTime DateTime
结束日期
final
format DateFormat?
标题显示样式
final
hashCode int
The hash code for this object.
no setterinherited
iconColor Color?
上/下个月icon颜色
final
insets EdgeInsets?
视图距左右边距
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
nextIconData IconData?
下个月icon
final
nextTitle String?
下个月描述文字
final
onSelectedDateTime → dynamic Function(bool, DateTime)
返回月份是否切换以及当前选中日期datetime
final
previousIconData IconData?
上个月icon
final
previousTitle String?
上个月描述文字
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedColor Color?
选中日期字体颜色
final
showExpandMore bool
是否允许月周显示切换
final
startDateTime DateTime
起始日期
final
subTitleDisableColor Color?
在当前日期之前的副标题颜色
final
subTitleEnableColor Color?
当前日期的副标题颜色
final
subTitleFutureColor Color?
当前日期之后的副标题颜色
final
titleColor Color?
日期颜色
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CalendarViewState
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