Uri uri

Returns a Uri representing the file system entity's location.

The returned URI's scheme is always "file" if the entity's path is absolute, otherwise the scheme will be empty.

Source

Uri get uri => new Uri.file(path);