TDMultiPicker class

项之间无联动的多项选择器

Inheritance

Constructors

TDMultiPicker({required String? title, required MultiPickerCallback? onConfirm, MultiPickerCallback? onCancel, required List<List<String>> data, required double pickerHeight, required int pickerItemCount, List<int>? initialIndexes, TextStyle? leftTextStyle, TextStyle? rightTextStyle, TextStyle? centerTextStyle, double? titleHeight, double? topPadding, double? leftPadding, double? rightPadding, Color? titleDividerColor, Color? backgroundColor, double? topRadius, EdgeInsets? padding, ItemDistanceCalculator? itemDistanceCalculator, Widget? customSelectWidget, Key? key})
const

Properties

backgroundColor Color?
背景颜色
final
centerTextStyle TextStyle?
自定义中间文案样式
final
customSelectWidget Widget?
自定义选择框样式
final
data List<List<String>>
选择器的数据源
final
hashCode int
The hash code for this object.
no setterinherited
initialIndexes List<int>?
若为null表示全部从零开始
final
itemDistanceCalculator ItemDistanceCalculator?
不同距离自选项计算策略
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftPadding double?
左边填充
final
leftTextStyle TextStyle?
自定义左侧文案样式
final
onCancel MultiPickerCallback?
选择器取消按钮回调
final
onConfirm MultiPickerCallback?
选择器确认按钮回调
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
title String?
选择器标题
final
titleDividerColor Color?
标题分割线颜色
final
titleHeight double?
标题高度
final
topPadding double?
顶部填充
final
topRadius double?
顶部圆角
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
buildList(dynamic context, int position, List<FixedExtentScrollController> controllers) Widget
buildTitle(BuildContext context, List<FixedExtentScrollController> controllers) Widget
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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
getTitleHeight() double
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