showDoubleSelector static method
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,
显示双个选择器
Implementation
static 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 Function(SelectorItem? itemLeft, int? positionLeft,
SelectorItem? itemRight, int? positionRight)
callBack,
GestureTapCallback? onTapLeft,
GestureTapCallback? onTapRight}) {
showModalBottomSheet(
context: context,
isScrollControlled: false,
backgroundColor: Colors.transparent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius ?? _radius),
topRight: Radius.circular(radius ?? _radius),
)),
builder: (BuildContext context) {
return SelectorDoubleWidget(
listLeft: listLeft,
listRight: listRight,
height: height ?? _height,
radius: radius ?? _radius,
itemExtent: itemExtent ?? _itemExtent,
padding: padding ?? _padding,
textSize: textSize ?? _textSize,
textLeft: textLeft ?? _textLeft,
textRight: textRight ?? _textRight,
textColor: textColor ?? _textColor,
textColorLeft: textColorLeft ?? _textColorLeft,
textColorRight: textColorRight ?? _textColorRight,
lineColor: lineColor ?? _lineColor,
backgroundColor: backgroundColor ?? _backgroundColor,
positionLeft: positionLeft,
positionRight: positionRight,
diameterRatio: _diameterRatio ?? diameterRatio,
offAxisFraction: _offAxisFraction ?? offAxisFraction,
magnification: _magnification ?? magnification,
squeeze: _squeeze ?? squeeze,
selectionOverlay: selectionOverlay,
callBack: callBack,
onTapLeft: onTapLeft,
onTapRight: onTapRight);
});
}