getTemporaryDirectory static method
Retrieve the path of your operating system's temporary directory.
Support Android
and iOS
only for now.
Implementation
static Future<Directory> getTemporaryDirectory() async {
final String? path =
await _methodChannel.invokeMethod('get_temporary_directory');
if (path == null) {
throw Exception('Unable to get temporary directory');
}
return Directory(path);
}