toUriOr method

Uri toUriOr(
  1. Uri defaultValue, {
  2. dynamic mapKey,
  3. int? listIndex,
  4. DynamicConverter<Uri>? converter,
})

Converts to Uri, falling back to defaultValue on failure.

Implementation

Uri toUriOr(
  Uri defaultValue, {
  dynamic mapKey,
  int? listIndex,
  DynamicConverter<Uri>? converter,
}) =>
    tryToUri(
      mapKey: mapKey,
      listIndex: listIndex,
      defaultValue: defaultValue,
      converter: converter,
    ) ??
    defaultValue;