showEventPicker function

dynamic showEventPicker(
  1. BuildContext context, {
  2. CancelCallBack? onCancel,
  3. required List<EventPickerBean> eventBeanList,
  4. required EventPickerType type,
})

Implementation

showEventPicker(
  BuildContext context, {
  CancelCallBack? onCancel,
  required List<EventPickerBean> eventBeanList,
  required EventPickerType type,
}) {
  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) => EventPicker(
            cancelText: "取消",
            onCancel: onCancel,
            eventBeanList: eventBeanList,
            type: type,
          ));
}