nestedModal<T> function Null safety

Future<T?> nestedModal<T>(
  1. BuildContext context,
  2. WidgetBuilder scrollBuilder,
  3. {bool displayDragHandle = true,
  4. required PathRouteSettings? settings}
)

Implementation

Future<T?> nestedModal<T>(
  BuildContext context,
  WidgetBuilder scrollBuilder, {
  bool displayDragHandle = true,
  required PathRouteSettings? settings,
}) {
  Widget? w;
  return context.page<T>((context) {
    return w ??= scrollBuilder(context);
  });
}