showSKBottomSheetDialog<T> function

Future<T?> showSKBottomSheetDialog<T>(
  1. Widget child, {
  2. bool isCancelable = true,
  3. BuildContext? context,
  4. RoundedRectangleBorder? shape,
  5. BuildContextPredicate buildContextPredicate = _defaultContextPredicate,
})

Implementation

Future<T?> showSKBottomSheetDialog<T>(
  Widget child, {
  bool isCancelable = true,
  BuildContext? context,
  RoundedRectangleBorder? shape,
  BuildContextPredicate buildContextPredicate = _defaultContextPredicate,
}) {
  if (context == null) {
    _throwIfNoContext(_contextMap.values, 'showAlert');
  }
  context ??= buildContextPredicate(_contextMap.values);

  return showModalBottomSheet<T>(
    context: context,
    isScrollControlled: true,
    builder: (context) {
      return AnimatedPadding(
        padding: MediaQuery.of(context).viewInsets,
        duration: const Duration(milliseconds: 100),
        curve: Curves.bounceOut,
        child: child,
      );
    },
    clipBehavior: Clip.hardEdge,
    shape: shape ??
        const RoundedRectangleBorder(
          borderRadius: BorderRadius.vertical(top: Radius.circular(15.0)),
        ),
  );
}