Bumps [pigeon](https://github.com/flutter/packages/tree/main/packages) from 22.7.4 to 24.1.1. <details> <summary>Commits</summary> <ul> <li><a href="94ce998033"><code>94ce998</code></a> [pigeon] Add errors for ProxyAPI callback methods and null instances when rea...</li> <li><a href="1ecb531bdd"><code>1ecb531</code></a> [shared_preferences]Fix : SetState returning future (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8398">#8398</a>)</li> <li><a href="10234434b8"><code>1023443</code></a> [various] Add deprecation notices to READMEs (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8598">#8598</a>)</li> <li><a href="05663719a0"><code>0566371</code></a> [camera] Remove OCMock from CameraSettingsTests, CameraMethodChannelTests and...</li> <li><a href="fec5ec563e"><code>fec5ec5</code></a> [camera] Remove OCMock from FLTCamPhotoCaptureTests, FLTSavePhotoDelegateTest...</li> <li><a href="970d858458"><code>970d858</code></a> [go_router] Add <code>preload</code> parameter to <code>StatefulShellBranchData.$branch</code> (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8545">#8545</a>)</li> <li><a href="24d6d9c6d0"><code>24d6d9c</code></a> [video_player_avfoundation] iOS platform view support (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8237">#8237</a>)</li> <li><a href="625023aa03"><code>625023a</code></a> [camera] Remove OCMock from AvailableCamerasTests, CameraOrientationTests and...</li> <li><a href="cb1897817d"><code>cb18978</code></a> [pigeon] Adds annotation options to omit shared classes used in Event Channel...</li> <li><a href="bae29f6ed5"><code>bae29f6</code></a> [quick_actions] Update Android Pigeon version (<a href="https://github.com/flutter/packages/tree/main/packages/issues/8580">#8580</a>)</li> <li>Additional commits viewable in <a href="https://github.com/flutter/packages/commits/pigeon-v24.1.1/packages">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Add-to-App Samples
This directory contains Android and iOS projects that import and use a Flutter module. They're designed to show recommended approaches for adding Flutter to existing Android and iOS apps.
Samples Listing
fullscreen— Embeds a full screen instance of Flutter into an existing iOS or Android app.prebuilt_module— Embeds a full screen instance of Flutter as a prebuilt library that can be loaded into an existing iOS or Android app.plugin— Embeds a full screen Flutter instance that is using plugins into an existing iOS or Android app.books— Mimics a real world use-case of embedding Flutter into an existing Android app and demonstrates using Pigeon to communicate between Flutter and the host application.multiple_flutters— Shows the usage of the Flutter Engine Group APIs to embed multiple instances of Flutter into an existing app with low memory cost.android_view— Shows how to integrate a Flutter add-to-app module at a view level for Android.
Goals for these samples
- Show developers how to add Flutter to their existing applications.
- Show the following options:
- Whether to build the Flutter module from source each time the app builds or rely on a separately pre-built module.
- Whether plugins are needed by the Flutter module used in the app.
- Show Flutter being integrated ergonomically with applications with existing middleware and business logic data classes.
Installing Cocoapods
The iOS samples in this repo require the latest version of Cocoapods. To make sure you've got it, run the following command on a macOS machine:
sudo gem install cocoapods
See https://guides.cocoapods.org/using/getting-started.html for more details.
Debugging
You can flutter attach to the running host application to debug the Flutter
module. This will
allow you to hot reload, set breakpoints, and use DevTools and other debugging
functionality, similar to a full Flutter app.
Issues
If you run into an issue with the sample itself, please file an issue in the Flutter samples repo.
Updating Android samples and its dependencies
- Open the top level build.gradle file in Android Studio
- Open “Upgrade Assistant” and click upgrade
Troubleshooting Android updates
-
If after upgrading it fails to build, try upgrading to a slightly less new version
-
If there's an "Unknown class version exception " try setting the version of Java used by modifying JAVA_HOME
-
If it still fails to build, check that the Flutter code referenced in the build is up-to-date and doesn't use discontinued plugins. (Common cases include “namespace”)
-
The 'project structure' -> 'modules' view can be helpful in understanding the dependency tree.
-
Once the app builds with the latest gradle/agp, update any deprecated usages in app/build.gradle
-
compileSdkVersion -> sdkVersion
-
Update the target sdk version and read through each target sdk update
-
Export broadcast receivers
-
Update the way flutter is imported to use flutter gradle plugin
-
When updating an app that uses AAR as a Flutter module -- In android studio update any android dependencies that are indicated as in yellow as old. Keep
androidx.test:runner,androidx.test.espresso:espresso-core, andandroidx.test:core, as defined in https://github.com/flutter/packages/tree/main/packages/espresso