Write data to the file.

Read data from the file.

Note:
To learn more, watch this Package of the Week video on the path_provider package:

1. Find the correct local path

This example displays a counter. When the counter changes,
write data on disk so you can read it again when the app loads.
Where should you store this data?

The path_provider package
provides a platform-agnostic way to access commonly used locations on the
device’s file system. The plugin currently supports access to
two file system locations:

A temporary directory (cache) that the system can
clear at any time. On iOS, this corresponds to the
NSCachesDirectory. On Android, this is the value that
getCacheDir() returns.

A directory for the app to store files that only
it can access. The system clears the directory only when the app
is deleted.
On iOS, this corresponds to the NSDocumentDirectory.
On Android, this is the AppData directory.