mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-08 09:53:12 +00:00
17 lines
441 B
Dart
17 lines
441 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
class NavigationService {
|
|
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
|
NavigatorState? get navigator => navigatorKey.currentState;
|
|
|
|
void showPopUpDialog(AlertDialog dialog) {
|
|
final context = navigatorKey.currentState!.overlay!.context;
|
|
|
|
showDialog(
|
|
context: context,
|
|
builder: (_) => dialog,
|
|
);
|
|
}
|
|
}
|