showMultiPicker static method

void showMultiPicker(
  1. dynamic context, {
  2. String? title,
  3. required MultiPickerCallback? onConfirm,
  4. MultiPickerCallback? onCancel,
  5. required List<List<String>> data,
  6. List<int>? initialIndexes,
  7. Duration duration = const Duration(milliseconds: 100),
  8. Color? barrierColor,
  9. double pickerHeight = 200,
  10. int pickerItemCount = 5,
})

显示多级选择器

Implementation

static void showMultiPicker(context,
    {String? title,
    required MultiPickerCallback? onConfirm,
    MultiPickerCallback? onCancel,
    required List<List<String>> data,
    List<int>? initialIndexes,
    Duration duration = const Duration(milliseconds: 100),
    Color? barrierColor,
    double pickerHeight = 200,
    int pickerItemCount = 5}) {
  showModalBottomSheet(
      context: context,
      backgroundColor: Colors.transparent,
      barrierColor: barrierColor ?? TDTheme.of(context).fontGyColor2.withOpacity(0.6),
      builder: (context) {
        return TDMultiPicker(
          title: title,
          onConfirm: onConfirm,
          onCancel: onCancel,
          data: data,
          initialIndexes: initialIndexes,
          pickerHeight: pickerHeight,
          pickerItemCount: pickerItemCount,
        );
      });
}