showSinglePicker function

dynamic showSinglePicker(
  1. BuildContext context, {
  2. String title = "",
  3. required SingleDoneCallBack onDone,
  4. required Map<dynamic, String> itemData,
  5. SinglePickerType type = SinglePickerType.bottomCancel,
  6. String selectedKey = "",
  7. CancelCallBack? onCancel,
})

Implementation

showSinglePicker(
  BuildContext context, {
  String title = "",
  required SingleDoneCallBack onDone,
  required Map<dynamic, String> itemData,
  SinglePickerType type = SinglePickerType.bottomCancel,
  String selectedKey = "",
  CancelCallBack? onCancel,
}) {
  FocusManager.instance.primaryFocus?.unfocus();
  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) => _getPicker(title, itemData, onDone, selectedKey, onCancel, type));
}