setContext static method
Set the context for navigation
Implementation
static void setContext(BuildContext? context) {
_context = context;
// Try to find navigator from context
if (context != null) {
final navigator = Navigator.maybeOf(context);
if (navigator != null) {
// Context has navigator, we can use it
}
}
}