toAndExpectData<T> method

Future<T?> toAndExpectData<T>(
  1. String routeName, {
  2. Map<String, dynamic>? args,
})

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(this).toAndExpectData(routeName, args: args);
}