showMultipleSelector static method

dynamic showMultipleSelector(
  1. BuildContext context, {
  2. required List<List<SelectorItem>> list,
  3. double? height,
  4. double? radius,
  5. double? itemExtent,
  6. double? padding,
  7. double? textSize,
  8. String? textLeft,
  9. String? textRight,
  10. Color? textColor,
  11. Color? textColorLeft,
  12. Color? textColorRight,
  13. Color? lineColor,
  14. Color? backgroundColor,
  15. double? diameterRatio,
  16. double? offAxisFraction,
  17. double? magnification,
  18. double? squeeze,
  19. Widget? selectionOverlay,
  20. required List<int> listPosition,
  21. required dynamic callBack(
    1. List<SelectorItem> selectorItems,
    2. List<int> positions
    ),
  22. GestureTapCallback? onTapLeft,
  23. GestureTapCallback? onTapRight,
})

显示多个选择器(没有数量限制)

Implementation

static 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 Function(List<SelectorItem> selectorItems, List<int> positions)
        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 SelectorMultipleWidget(
            list: list,
            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,
            listPosition: listPosition,
            diameterRatio: _diameterRatio ?? diameterRatio,
            offAxisFraction: _offAxisFraction ?? offAxisFraction,
            magnification: _magnification ?? magnification,
            squeeze: _squeeze ?? squeeze,
            selectionOverlay: selectionOverlay,
            callBack: callBack,
            onTapLeft: onTapLeft,
            onTapRight: onTapRight);
      });
}