pop method
void
pop()
Pops the current route off the navigation stack.
Implementation
void pop() {
try {
if (context != null) {
Navigator.pop(context!);
} else if (navigatorKey != null) {
navigatorKey!.currentState!.pop();
}
} catch (e) {
print('Error in pop: $e');
}
}