showDoubleSelector static method

dynamic showDoubleSelector(
  1. BuildContext context, {
  2. required List<SelectorItem> listLeft,
  3. required List<SelectorItem> listRight,
  4. double? height,
  5. double? radius,
  6. double? itemExtent,
  7. double? padding,
  8. double? textSize,
  9. String? textLeft,
  10. String? textRight,
  11. Color? textColor,
  12. Color? textColorLeft,
  13. Color? textColorRight,
  14. Color? lineColor,
  15. Color? backgroundColor,
  16. int? positionLeft = 0,
  17. int? positionRight = 0,
  18. double? diameterRatio,
  19. double? offAxisFraction,
  20. double? magnification,
  21. double? squeeze,
  22. Widget? selectionOverlay,
  23. required dynamic callBack(
    1. SelectorItem? itemLeft,
    2. int? positionLeft,
    3. SelectorItem? itemRight,
    4. int? positionRight,
    ),
  24. GestureTapCallback? onTapLeft,
  25. 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);
      });
}