open<T extends Object> static method

Future<T?> open<T extends Object>({
  1. required BuildContext context,
  2. required Widget child,
  3. Color? backgroundColor,
})

Implementation

static Future<T?> open<T extends Object>({
  required BuildContext context,
  required Widget child,
  Color? backgroundColor,
}) async {
  if (ResponsiveComponent.isDesktop(context)) {
    return await showDialog<T>(
        context: context,
        builder: (context) {
          return OdinNavigatorModal(
            backgroundColor: backgroundColor,
            child: child,
          );
        });
  }
  return await showDialog<T>(
      context: context,
      builder: (context) {
        return OdinNavigatorModal(
          backgroundColor: backgroundColor,
          child: child,
        );
      });
}