TDDatePicker class

时间选择器

Inheritance

Constructors

TDDatePicker({required String title, required DatePickerCallback? onConfirm, DatePickerCallback? onCancel, Color? backgroundColor, Color? titleDividerColor, double? topRadius, double? titleHeight, EdgeInsets? padding, double? leftPadding, double? rightPadding, TextStyle? leftTextStyle, TextStyle? rightTextStyle, TextStyle? centerTextStyle, Widget? customSelectWidget, ItemDistanceCalculator? itemDistanceCalculator, required DatePickerModel model, bool showTitle = true, double pickerHeight = 200, required int pickerItemCount, Key? key})
const

Properties

backgroundColor Color?
背景颜色
final
centerTextStyle TextStyle?
自定义中间文案样式
final
customSelectWidget Widget?
自定义选择框样式
final
hashCode int
The hash code for this object.
no setterinherited
itemDistanceCalculator ItemDistanceCalculator?
根据距离计算字体颜色、透明度、粗细
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftPadding double?
左边填充
final
leftTextStyle TextStyle?
自定义左侧文案样式
final
model DatePickerModel
数据模型
final
onCancel DatePickerCallback?
选择器取消按钮回调
final
onConfirm DatePickerCallback?
选择器确认按钮回调
final
padding EdgeInsets?
适配padding
final
pickerHeight double
选择器List的视窗高度,默认200
final
pickerItemCount int
选择器List视窗中item个数,pickerHeight / pickerItemCount即item高度
final
rightPadding double?
右边填充
final
rightTextStyle TextStyle?
自定义右侧文案样式
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showTitle bool
是否展示标题
final
title String
选择器标题
final
titleDividerColor Color?
标题分割线颜色
final
titleHeight double?
标题高度
final
topRadius double?
顶部圆角
final

Methods

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