setLastPickedDirectory method

void setLastPickedDirectory(
  1. {required MediaType type,
  2. required Directory directory}
)

Returns the last navigated directory the user used for picking a file for a certain media type.

Implementation

void setLastPickedDirectory({
  required MediaType type,
  required Directory directory,
}) {
  _preferences.put('${type.uniqueKey}/last_picked_file', directory.path);
}