|Jeroen Weener <JeroenWeener@users.noreply.github.com>
|Wed May 31 17:28:11 2023 +0200
|Wed May 31 15:28:11 2023 +0000
[image_picker] Move disk accesses to background thread (#4058) The plugin accesses the disk on the UI thread at several occasions as reported by https://github.com/flutter/flutter/issues/91393. These instances can easily be found by running the plugin with [StrictMode](https://developer.android.com/reference/android/os/StrictMode) enabled. The occasions that are highlighted are when determining the application's cache directory and when fetching `SharedPreferences`. By running method channel invocations on a background channel using Pidgeon's `@TaskQueue()` annotation and deferring said IO operations to the moment where they are actually needed, this PR makes sure the plugin no longer accesses the disk from the UI thread. This PR is a follow-up to #3506 - Fixes https://github.com/flutter/flutter/issues/91393.
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the
packages directory to see all packages.
These packages are also available on pub.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
These are the packages hosted in this repository: