argument<T> static method

T argument<T>()

Give current route arguments.

Like push/popAndPushNamed method, can set any type arguments that like string or object, using generic type and this method will transmit and return.

e.g. push("/NextScreen", arguments: 'Get is the best');

  String argument = NavigationUtils.argument('arguments');
  assert(argument == 'Get is the best');

Implementation

static T argument<T>() {
  return Get.arguments as T;
}