getAbsolutePath static method
Gets absolute path of the file from android URI or iOS PHAsset identifier. The return of this method can be used directly with flutter File class.
If you want to change the temp file's name or extension you can use outputFileName
and fileExtension
properties.
Implementation
static Future<String?> getAbsolutePath({
required String uri,
String? outputFileName,
String? fileExtension,
}) async {
final Map<String, dynamic> params = <String, dynamic>{
'uri': uri,
'outputFileName': outputFileName,
'fileExtension': fileExtension ?? _getFileExtensionFromUri(uri),
};
final String? path = await _channel.invokeMethod('getAbsolutePath', params);
return path;
}