to<T> method
Future<T?>
to<
T>( - String location, {
- Map<String, dynamic> pathParams = const <String, dynamic>{},
- Map<String, dynamic> queryParams = const <String, dynamic>{},
- Map<String, dynamic> params = const <String, dynamic>{},
})
Implementation
Future<T?> to<T>(
String location, {
Map<String, dynamic> pathParams = const <String, dynamic>{},
Map<String, dynamic> queryParams = const <String, dynamic>{},
Map<String, dynamic> params = const <String, dynamic>{},
}) {
if (GetPlatform.isWeb) {
go(
location,
pathParams: pathParams,
queryParams: queryParams,
params: params,
);
return Future<T>.value(null);
} else {
return push<T>(
location,
pathParams: pathParams,
queryParams: queryParams,
params: params,
);
}
}