canOpenFile method

Future<bool> canOpenFile(
  1. Uri uri
)

Checks whether the file at uri is accessible for reading.

Platforms: Android · iOS · macOS · Windows · Linux Web: throws UnsupportedError

Notes:

  • Android supports content:// and file:// URIs.
  • iOS supports file:// and ph:// (Photos assets) URIs.

Returns false if the file has been deleted or is no longer accessible.

Implementation

Future<bool> canOpenFile(Uri uri) {
  throw UnimplementedError('canOpenFile is not implemented on this platform');
}