cake_wallet/lib/utils/show_pop_up.dart
Omar Hatem 367efb3cae
V4.6.4 fixes (#904)
* Check if context is still mounted or not before showing popup

* - Refactor Restore route flow
- Fix Monero.com restore from QR
- Remove deprecated restore classes
- Update Monero.com app version and notes

* Update Macos version and release notes

* Fixate android plugin versions as Flutter published new fail packages version

* Revert desktop changes as it's not supported yet to scan QR code on Desktop [skip ci]

* Revert macos version update [skip ci]
2023-04-27 17:06:09 +02:00

23 lines
632 B
Dart

import 'package:flutter/material.dart';
Future<T?> showPopUp<T>(
{required BuildContext context,
required WidgetBuilder builder,
bool barrierDismissible = true,
Color? barrierColor,
bool useSafeArea = false,
bool useRootNavigator = true,
RouteSettings? routeSettings}) async {
if (context.mounted) {
return showDialog<T>(
context: context,
builder: builder,
barrierDismissible: barrierDismissible,
barrierColor: barrierColor,
useSafeArea: useSafeArea,
useRootNavigator: useRootNavigator,
routeSettings: routeSettings);
}
return null;
}