Pickers class
onChanged
选择器发生变动
onConfirm
选择器提交
pickerStyle
样式
suffix
后缀
Constructors
- Pickers()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
showAddressPicker(
BuildContext context, {PickerStyle? pickerStyle, String initProvince = '', String initCity = '', String? initTown, bool addAllItem = true, AddressCallback? onChanged, AddressCallback? onConfirm, dynamic onCancel(bool isCancel)?, bool overlapTabBar = false}) → void -
自定义 地区选择器
initProvince
初始化 省initCity
初始化 市initTown
初始化 区onChanged
选择器发生变动onConfirm
选择器提交addAllItem
市、区是否添加 '全部' 选项 默认:true -
showDatePicker(
BuildContext context, {DateMode mode = DateMode.YMD, PDuration? selectDate, PDuration? maxDate, PDuration? minDate, Suffix? suffix, PickerStyle? pickerStyle, DateCallback? onChanged, DateCallback? onConfirm, dynamic onCancel(bool isCancel)?, bool overlapTabBar = false}) → void -
时间选择器
Suffix : 每列时间对应的单位 默认:中文常规 Suffix(years: '年',month: '月');
selectDate
: 初始化选中时间 默认现在 PDuration.now(); PDuration.parse(DateTime.parse('20210139')); PDuration(year: 2020,month: 2);maxDate
: 最大时间 用法同上 tip: 当只有单列数据,该限制不产生关联 只针对单列item限制,比如 maxDate>day = 3 minDate>day = 10,那么所有的月份都只显示3-10之间minDate
: 最小时间 用法同上mode
: 时间选择器所显示样式 16 种时间样式 默认:DateMode.YMD -
showMultiLinkPicker(
BuildContext context, {required dynamic data, required int columeNum, List? selectData, List? suffix, PickerStyle? pickerStyle, MultipleLinkCallback? onChanged, MultipleLinkCallback? onConfirm, dynamic onCancel(bool isCancel)?, bool overlapTabBar = false}) → void -
通用 多列选择器
有关联
columeNum
最大的列数 -
showMultiPicker(
BuildContext context, {required List< List> data, List? selectData, List? suffix, PickerStyle? pickerStyle, MultipleCallback? onChanged, MultipleCallback? onConfirm, dynamic onCancel(bool isCancel)?, bool overlapTabBar = false}) → void - 通用 多列选择器 无关联
-
showSinglePicker(
BuildContext context, {required dynamic data, dynamic selectData, String? suffix, PickerStyle? pickerStyle, SingleCallback? onChanged, SingleCallback? onConfirm, dynamic onCancel(bool isCancel)?, bool overlapTabBar = false}) → void - 单列 通用选择器