showSmoothModalSheet<T> function
Implementation
Future<T?> showSmoothModalSheet<T>({
required BuildContext context,
required WidgetBuilder builder,
double? minHeight,
double? maxHeight,
bool? isScrollControlled,
bool? useRootNavigator,
}) {
BoxConstraints? constraints;
// We can't provide a null value to a [BoxConstraints] constructor
if (minHeight != null && maxHeight != null) {
constraints = BoxConstraints(minHeight: minHeight, maxHeight: maxHeight);
} else if (minHeight != null) {
constraints = BoxConstraints(minHeight: minHeight);
} else if (maxHeight != null) {
constraints = BoxConstraints(maxHeight: maxHeight);
}
return showModalBottomSheet<T>(
constraints: constraints,
isScrollControlled: isScrollControlled ?? true,
context: context,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: ROUNDED_RADIUS),
),
builder: builder,
useRootNavigator: useRootNavigator ?? false,
useSafeArea: true,
);
}