Repository: flutter
Issue: [image_picker] `pickMultiImage` takes longer to process on some devices
Labels: platform-android,platform-ios,a: quality,p: image_picker,package,team-ecosystem,has reproducible steps,P2,found in release: 2.5,found in release: 2.6,triaged-ecosystem

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a performance problem, then fill out the template below.
     Please read our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Details

<!--
1.  Please tell us exactly how to reproduce the problem you are running into.

2.  Please attach a small application (ideally just one main.dart file) that
     reproduces the problem. You could use https://gist.github.com/ for this.

3.  Switch flutter to master channel and run this app on a physical device
     using profile mode with Skia tracing enabled, as follows:
       flutter channel master
       flutter run --profile --trace-skia

     The bleeding edge master channel is encouraged here because Flutter is
     constantly fixing bugs and improving its performance. Your problem in an
     older Flutter version may have already been solved in the master channel.

4.  Record a video of the performance issue using another phone so we
     can have an intuitive understanding of what happened. Don’t use
     "adb screenrecord", as that affects the performance of the profile run.

5.  Open Observatory and save a timeline trace of the performance issue
     so we know which functions might be causing it. See "How to Collect
     and Read Timeline Traces" on this blog post:
       https://medium.com/flutter/profiling-flutter-applications-using-the-timeline-a1a434964af3#a499
     Make sure the performance overlay is turned OFF when recording the
     trace as that may affect the performance of the profile run.
     (Pressing ‘P’ on the command line toggles the overlay.)
-->

<!--
     Please tell us which target platform(s) the problem occurs (Android / iOS / Web / macOS / Linux / Windows)
     Which target OS version, for Web, browser, is the test system running?
     Does the problem occur on emulator/simulator as well as on physical devices?
-->

When using `pickMultiImage` to select multiple large files the async method takes a while to return to the app, depending on the size and count of images. Is there a way to return to the app quicker and perform the operation asynchronously? I've tried replacing await with then, but this doesn't seem to help

```dart
  void _selectFromGallery() async {
    final images =
        await _picker.pickMultiImage(maxWidth: 2000, imageQuality: 80);
    if (images != null) {
      setState(() => _imagePaths.addAll(images.map((image) => image.path)));
    }
  }
```

## Logs

<details>
<summary>flutter doctor -v</summary>

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

<!-- Finally, paste the output of running `flutter doctor -v` here, with your device plugged in. -->

```
[✓] Flutter (Channel stable, 2.5.1, on Pop!_OS 21.04 5.13.0-7614-generic, locale en_US.UTF-8)
    • Flutter version 2.5.1 at /home/michaeltintiuc/snap/flutter/common/flutter
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision ffb2ecea52 (9 days ago), 2021-09-17 15:26:33 -0400
    • Engine revision b3af521a05
    • Dart version 2.14.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/michaeltintiuc/Android/Sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2)
    • All Android licenses accepted.
```

</details>