closeOverlay<T> method
Closes the currently open overlay (Snackbar, Dialog, or BottomSheet).
id
is for when using nested navigation.
Implementation
void closeOverlay<T>({
String? id,
T? result,
}) {
searchDelegate(id).navigatorKey.currentState?.pop(result);
}