showSinglePicker function
dynamic
showSinglePicker(
- BuildContext context, {
- String title = "",
- required SingleDoneCallBack onDone,
- required Map<
dynamic, String> itemData, - SinglePickerType type = SinglePickerType.bottomCancel,
- String selectedKey = "",
- 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));
}