of<T extends Object?> static method
- BuildContext context
Returns the modal route most closely associated with the given context.
Returns null if the given context is not associated with a modal route.
The given BuildContext will be rebuilt if the state of the route changes while it is visible (specifically, if isCurrent or canPop change value).
Implementation
@optionalTypeArgs
static ModalRoute<T>? of<T extends Object?>(BuildContext context) {
return _of<T>(context);
}