Selector class

选择器

Constructors

Selector()

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

init({double height = 240, double radius = 6, double itemExtent = 48, double padding = 16, double textSize = 16, String textLeft = '取消', String textRight = '完成', Color textColor = const Color(0xFF333333), Color textColorLeft = const Color(0xFF808080), Color textColorRight = const Color(0xFFFF8000), Color lineColor = const Color(0xFFEBEBEB), Color backgroundColor = const Color(0xFFE0E0E0), double? diameterRatio, double? offAxisFraction, double? magnification, double? squeeze}) → dynamic
初始化默认值,提供可自定义的参数(可选项)
showDoubleSelector(BuildContext context, {required List<SelectorItem> listLeft, required List<SelectorItem> listRight, double? height, double? radius, double? itemExtent, double? padding, double? textSize, String? textLeft, String? textRight, Color? textColor, Color? textColorLeft, Color? textColorRight, Color? lineColor, Color? backgroundColor, int? positionLeft = 0, int? positionRight = 0, double? diameterRatio, double? offAxisFraction, double? magnification, double? squeeze, Widget? selectionOverlay, required dynamic callBack(SelectorItem? itemLeft, int? positionLeft, SelectorItem? itemRight, int? positionRight), GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) → dynamic
显示双个选择器
showMultipleLinkSelector(BuildContext context, {required List<SelectorItem> list, double? height, double? radius, double? itemExtent, double? padding, double? textSize, String? textLeft, String? textRight, Color? textColor, Color? textColorLeft, Color? textColorRight, Color? lineColor, Color? backgroundColor, double? diameterRatio, double? offAxisFraction, double? magnification, double? squeeze, Widget? selectionOverlay, required List<int> listPosition, required dynamic callBack(List<SelectorItem> selectorItems, List<int> positions), GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) → dynamic
显示多个选择器(支持联动,最多不超过4级)
showMultipleSelector(BuildContext context, {required List<List<SelectorItem>> list, double? height, double? radius, double? itemExtent, double? padding, double? textSize, String? textLeft, String? textRight, Color? textColor, Color? textColorLeft, Color? textColorRight, Color? lineColor, Color? backgroundColor, double? diameterRatio, double? offAxisFraction, double? magnification, double? squeeze, Widget? selectionOverlay, required List<int> listPosition, required dynamic callBack(List<SelectorItem> selectorItems, List<int> positions), GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) → dynamic
显示多个选择器(没有数量限制)
showSingleMultipleChoiceSelector(BuildContext context, {required List<SelectorItem> list, double? height, double? radius, double? itemExtent, double? padding, double? textSize, String? textLeft, String? textRight, Color? textColor, Color? textColorLeft, Color? textColorRight, Color? lineColor, Color? backgroundColor, double iconWidth = 24, Color selectColor = const Color(0xFFFF8000), Color unSelectedColor = const Color(0xFF999999), String iconAssetName = '', required dynamic callBack(List<SelectorItem> selectorItems), GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) → dynamic
显示单个选择器(支持多选)
showSingleSelector(BuildContext context, {required List<SelectorItem> list, double? height, double? radius, double? itemExtent, double? padding, double? textSize, String? textLeft, String? textRight, Color? textColor, Color? textColorLeft, Color? textColorRight, Color? lineColor, Color? backgroundColor, int position = 0, double? diameterRatio, double? offAxisFraction, double? magnification, double? squeeze, Widget? selectionOverlay, required dynamic callBack(SelectorItem item, int position), GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) → dynamic
显示单个选择器