toAndExpectData<T> method
Navigates to a named route and expects to receive data back.
routeName
is the name of the route to navigate to.
args
are the optional arguments to pass to the route.
Returns a Future that completes with the data received from the route.
Implementation
Future<T?> toAndExpectData<T>(String routeName,
{Map<String, dynamic>? args}) async {
return await Go.withKey(this).toAndExpectData(routeName, args: args);
}