closeDialog<T> method
Close the currently open dialog, returning a result, if provided
Implementation
void closeDialog<T>({String? id, T? result}) {
final topRoute = _topRoute(id: id);
// Stop if there is no dialog open
if (!_isDialogRoute(topRoute)) return;
_popOverlayRoute(topRoute!, id: id, result: result);
}