mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
367efb3cae
* 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]
23 lines
632 B
Dart
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;
|
|
}
|