flutter/examples
auto-submit[bot] 85564cbba9
Reverts "[Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#169276)" (#169347)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#169276
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: vashworth
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Causing google testing failures
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: gaaclarke
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {vashworth}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
## **BREAKING CHANGE**

Adopting Apple's UISceneDelegate protocol shifts the initialization
order of apps. For the common cases we've made sure they will work
without change. The one case that will require a change is any app that
in `-[UIApplicateDelegate didFinishLaunchingWithOptions:]` assumes that
`UIApplicationDelegate.window.rootViewController` is a
`FlutterViewController` instance. This is sometimes done to register
platform channels directly on the `FlutterViewController`. Instead users
should use the `FlutterPluginRegistry` API's to create platform channels
in `-[UIApplicateDelegate didFinishLaunchingWithOptions:]`, like
`FlutterPlugin`s do.

An example can be seen here:

https://github.com/flutter/flutter/pull/168914/files#diff-9f59c5248b58124beca7e290a57646023cda3ca024607092c6c6932606ce16ee

In extreme cases, like bespoke test harnesses, the startup logic can be
moved to `-[FlutterViewController awakeFromNib]` in a
FlutterViewController subclass.

An example can be seen here:

https://github.com/flutter/flutter/pull/169276/files#diff-dbe39c23a0a380447b90b7559a878dae8564616e0875c4ef0d9e99e02b91adac

## Changes since revert
I changed the init in `//dev/integration_tests/external_textures` from
the UIApplicationDelegate to the FlutterViewController's awakeFromNib.
This is a more appropriate place for initialization post-UISceneDelegate
since it avoids the launch engine altogether. I tried avoiding to make
the big change to prove we could do a small change to migrate that
project. I don't think this big refactor is indicative of what users
will experience. There was a timing assumption in the integration test
that required not using the launch engine at all.

## Description
fixes: https://github.com/flutter/flutter/issues/167267

design doc:


https://docs.google.com/document/d/1ZfcQOs-UKRa9jsFG84-MTFeibZTLKCvPQLxF2eskx44/edit?tab=t.0

relands https://github.com/flutter/flutter/pull/168396
relands https://github.com/flutter/flutter/pull/168914

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-05-23 14:59:47 +00:00
..
api Unpin test/test_core/test_api packages (#169198) 2025-05-22 23:15:08 +00:00
flutter_view macOS: Update minimum macOS version to 10.15 (#168101) 2025-05-01 04:02:25 +00:00
hello_world Unpin test/test_core/test_api packages (#169198) 2025-05-22 23:15:08 +00:00
image_list Unpin test/test_core/test_api packages (#169198) 2025-05-22 23:15:08 +00:00
layers Unpin test/test_core/test_api packages (#169198) 2025-05-22 23:15:08 +00:00
platform_channel Reverts "[Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#169276)" (#169347) 2025-05-23 14:59:47 +00:00
platform_channel_swift Reverts "[Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#169276)" (#169347) 2025-05-23 14:59:47 +00:00
platform_view macOS: Update minimum macOS version to 10.15 (#168101) 2025-05-01 04:02:25 +00:00
splash Unpin test/test_core/test_api packages (#169198) 2025-05-22 23:15:08 +00:00
texture Unpin test/test_core/test_api packages (#169198) 2025-05-22 23:15:08 +00:00
.clang-format Implement Linux part of examples (#108068) 2022-12-08 08:44:11 +13:00
flutter_gallery.readme Move flutter_gallery to the testing folder (#52532) 2020-03-16 10:31:42 +01:00
README.md Update flutter.dev links from misc packages to more permanent destinations (#150532) 2024-06-20 23:09:08 +00:00

Flutter Examples

This directory contains several examples of using Flutter. To run an example, use flutter run inside that example's directory. See the getting started guide to install the flutter tool.

For additional samples, see the flutter/samples repo.

Available examples include:

Notes

Note on Gradle wrapper files in .gitignore:

Gradle wrapper files should normally be checked into source control. The example projects don't do that to avoid having several copies of the wrapper binary in the Flutter repo. Instead, the Gradle wrapper is injected by Flutter tooling, and the wrapper files are .gitignore'd to avoid making the Flutter repository dirty as a side effect of running the examples.