setResult method

  1. @override
Future<void> setResult(
  1. String uri
)
override

This Method sends the selected Image's uri to the native thread. from the Flutter thread to send results to the app which invoked our app using ACTION_PICK INTENT.

Implementation

@override
Future<void> setResult(String uri) async {
  try {
    await methodChannel.invokeMethod('setResult', {
      'uri': uri,
    });
  } on PlatformException catch (e) {
    debugPrint(e.message);
  }
}