retrieveLostData static method
Future<void>
retrieveLostData(
- dynamic picker, {
- required dynamic onLoaded(
- File?
),
- dynamic onError(
- String
)?,
})
Implementation
static Future<void> retrieveLostData(
final picker, {
required Function(File?) onLoaded,
Function(String)? onError,
}) async {
final LostData response = await picker.getLostData();
if (response.isEmpty) {
return;
}
if (response.file == null) {
onError!(response.exception!.code);
return;
}
if (response.type == RetrieveType.video) {
return;
}
onLoaded(File(response.file!.path));
}