fromUri function Null safety

String fromUri(
  1. dynamic uri

Returns the path represented by uri, which may be a String or a Uri.

For POSIX and Windows styles, uri must be a file: URI. For the URL style, this will just convert uri to a string.

p.fromUri('file:///path/to/foo') // -> '/path/to/foo'

// Windows
p.fromUri('file:///C:/path/to/foo') // -> r'C:\path\to\foo'

// URL
  // -> ''

If uri is relative, a relative path will be returned.

p.fromUri('path/to/foo'); // -> 'path/to/foo'


String fromUri(uri) => context.fromUri(uri);