toUri<T> method

Future<T?> toUri<T>(
  1. Uri uri, {
  2. bool replace = false,
  3. Object? arguments,
})

Implementation

Future<T?> toUri<T>(
  Uri uri, {
  bool replace = false,
  Object? arguments,
}) {
  return to<T>(
    uri.path.isEmpty ? '/' : uri.path,
    query: uri.queryParameters,
    replace: replace,
    arguments: arguments ?? uri.fragment,
  );
}