toFile function
Create a File object from a uri.
Don't pass uri parameter using Uri object via uri.toString(). Because uri.toString() changes the string to lowercase which causes this package to misbehave
If you are using uni_links package for deep linking purpose. Pass the uri string using getInitialLink() or linkStream
Supported uri scheme same as supported by File.fromUri(uri) with content uri (Android Only)
If uri cannot reference a file this throws PlatformException or IOException
Implementation
Future<File> toFile(String uriString) {
return UriToFilePlatform.instance.toFile(uriString);
}