completeDialog method
void
completeDialog({
- required BuildContext context,
- required String completerId,
- dynamic result,
- dynamic pop = true,
Completes the _dialogCompleter to resume the Future's execution call
Implementation
void completeDialog(
{required BuildContext context,
required String completerId,
dynamic result,
pop = true}) {
if (_dialogCompleter.containsKey(completerId)) {
if (pop) {
try {
Navigator.of(context, rootNavigator: true).pop();
} catch (_) {}
}
_dialogCompleter[completerId]?.complete(result);
_dialogCompleter.remove(completerId);
}
}