useFromLocation function
Returns the previous accepted location, if any.
Throws a FlutterError when no RouteScopeProvider is found above the current BuildContext.
Implementation
HistoryLocation? useFromLocation(BuildContext context) {
return RouteScopeProvider.of(context, RouteScope.from).fromLocation;
}