1
Delete Operations
Future<bool>
This method first checks for the file’s existence using
exists() before attempting to call delete(). It is designed to be a non-crashing wrapper for file cleanup.2
Read and Access
Future<Map<String, dynamic>?>
A non-crashing wrapper for reading and parsing JSON files.It handles three common failure modes gracefully:
- File does not exist.
- File exists but cannot be read (e.g., permission error).
- File content is not valid JSON.
Future<Uint8List?>
A safe wrapper around
readAsBytes() that handles file existence and read errors gracefully. It is suitable for loading image or audio data.3
4
Comparators
bool
Checks if two
File objects point to the same file location on the filesystem.