uriWithExtension method

  1. @override
Uri uriWithExtension(
  1. String ext
)
override

Creates a new URI with the same path as this asset but with a different extension.

The ext parameter should include the leading dot (e.g., '.json').

Returns a new Uri with the specified extension.

Implementation

@override
Uri uriWithExtension(String ext) {
  return uri.replace(path: p.withoutExtension(uri.path) + ext);
}