open<T extends Object> static method
Future<T?>
open<T extends Object>({
- required BuildContext context,
- required Widget child,
- required bool forceFullPage,
- Color? backgroundColor,
Implementation
static Future<T?> open<T extends Object>({
required BuildContext context,
required Widget child,
required bool forceFullPage,
Color? backgroundColor,
}) async {
if (ResponsiveComponent.isDesktop(context) && !forceFullPage) {
return await showDialog<T>(
context: context,
builder: (context) {
return OdinNavigatorPage(
backgroundColor: backgroundColor,
forceFullPage: forceFullPage,
child: child,
);
});
}
return await Navigator.of(context)
.push<T>(MaterialPageRoute(builder: (context) {
return OdinNavigatorPage(
backgroundColor: backgroundColor,
forceFullPage: forceFullPage,
child: child,
);
}));
}