commit | e868ca2374505a0279a56414eed138d045e63aee | [log] [tgz] |
---|---|---|
author | stuartmorgan <stuartmorgan@google.com> | Tue Jun 21 13:33:24 2022 -0400 |
committer | GitHub <noreply@github.com> | Tue Jun 21 13:33:24 2022 -0400 |
tree | 10e5255e06e1f9af14f869313746568de24fe562 | |
parent | c3ba21345b16666b0fe11aef2077adc2a3b50962 [diff] |
[camera] Fix exception in registerWith (#6009) Fixes a regression from an unintented change in behavior during the conversion to an in-app method channel for Android and iOS. Although the Dart code for their implementations is almost identical to the shared method channel version, the differences in initialization paths caused the platform versions to try to use the widget bindings before they had been set up: The constructor for a `dartPluginClass` is called during `registerWith`, which is before `main`, but the constructor for the default implementation isn't called until `CameraPlatform.instance` is called, since Dart automatically does lazy static class initializtion. To avoid the issue without forcing bindings to be initialized early, this makes setting up the platform channel listener lazily. Fixes https://github.com/flutter/flutter/issues/106236
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter first-party plugins (i.e., plugins developed by the core Flutter team). Check the packages
directory for all plugins.
Flutter plugins enable access to platform-specific APIs. For more information about plugins, and how to use them, see https://flutter.dev/platform-plugins/.
These plugins are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo.
Issues pertaining to this repository are labeled “plugin”.
If you wish to contribute a new plugin to the Flutter ecosystem, please see the documentation for developing packages and platform channels. You can store your plugin source code in any GitHub repository (the present repo is only intended for plugins developed by the core Flutter team). Once your plugin is ready, you can publish it to the pub repository.
If you wish to contribute a change to any of the existing plugins in this repo, please review our contribution guide, and send a pull request.
These are the available plugins in this repository.