getLostData method

  1. @Deprecated('Switch to using retrieveLostData instead')
Future<LostData> getLostData()

Retrieve the lost PickedFile when selectImage or selectVideo 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 LostData object if successfully retrieved the lost data. The LostData 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

@Deprecated('Switch to using retrieveLostData instead')
Future<LostData> getLostData() {
  return platform.retrieveLostData();
}