retrieveLostData method

Future<LostDataResponse> retrieveLostData()

Retrieve the lost XFile when pickImage, pickMultiImage or pickVideo failed because the MainActivity is destroyed. (Android only)

Image or video can be lost if the MainActivity is destroyed. And there is no guarantee that the MainActivity is always alive. Call this method to retrieve the lost data and process the data according to your app's business logic.

Returns a LostDataResponse object if successfully retrieved the lost data. The LostDataResponse object can
represent either a successful image/video selection, or a failure.

Calling this on a non-Android platform will throw UnimplementedError exception.

See also:

Implementation

Future<LostDataResponse> retrieveLostData() {
  return platform.getLostData();
}