data<T> method

T? data<T>({
  1. dynamic defaultValue,
})

Returns data passed as an argument to a page e.g. routeTo("/my-page", data: {"hello": "world"})

Implementation

T? data<T>({dynamic defaultValue}) {
  if (_args == null) {
    return defaultValue;
  }

  dynamic data = _args?.data;
  if (data == null) {
    return defaultValue;
  }

  return data;
}