showMultiLevelScrollPicker function

dynamic showMultiLevelScrollPicker(
  1. BuildContext context, {
  2. required String title,
  3. Widget? tipsWidget,
  4. required List<MultiLevelPickerModel> data,
  5. required dynamic onDone(
    1. String firstLevelKey,
    2. String? secondLevelKey
    ),
})

Implementation

showMultiLevelScrollPicker(BuildContext context,
    {required String title,
    Widget? tipsWidget,
    required List<MultiLevelPickerModel> data,
    required Function(String firstLevelKey, String? secondLevelKey) onDone}) {
  showModalBottomSheet(
      context: context,
      barrierColor: const Color.fromRGBO(0, 0, 0, 0.7),
      isScrollControlled: true,
      enableDrag: false,
      constraints: BoxConstraints(maxHeight: 650),
      backgroundColor: Colors.transparent,
      builder: (context) => MultiLevelScrollPicker(title: title, data: data, tipsWidget: tipsWidget, onDone: onDone));
}