Enable SwiftPM by default on master and beta (#182923)

This PR turns SwiftPM on by default. This will opt users into SwiftPM
and auto-migrate their project if it hasn't already been migrated. Users
can still opt-out using these instructions:
https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers#how-to-turn-off-swift-package-manager


Fixes https://github.com/flutter/flutter/issues/151567.

Validated a bunch of non-presubmit test:

- [x] [Mac
flavors_test_macos](https://ci.chromium.org/b/8688777896504775697)
- [x] [Mac
integration_ui_test_test_macos](https://ci.chromium.org/b/8688777776881743345)
- [x] [Mac
platform_channel_sample_test_macos](https://ci.chromium.org/b/8688777747514736049)
- [x] [Mac
native_assets_ios_simulator](https://ci.chromium.org/b/8688773882663309793)
- [x] [Mac_arm64
build_ios_framework_module_test](https://ci.chromium.org/b/8688777538801602449)
- [x] [Mac_arm64
build_tests_1_4](https://ci.chromium.org/b/8688777432424952049)
- [x] [Mac_arm64
plugin_lint_mac](https://ci.chromium.org/b/8688771010490841873)
- [x] [Mac_arm64
hot_mode_dev_cycle_macos_target__benchmark](https://ci.chromium.org/b/8688777338792293857)
- [x] [Mac_arm64
ios_app_with_extensions_test](https://ci.chromium.org/b/8688777319802762593)
- [x] [Mac_arm64
macos_chrome_dev_mode](https://ci.chromium.org/b/8688777273798323777)
- [x] [Mac_arm64
run_release_test_macos](https://ci.chromium.org/b/8688777255514805665)
- [x] [Mac_arm64
mac_desktop_impeller](https://ci.chromium.org/b/8688775259036455505)
- [x] [Mac_benchmark
animated_complex_opacity_perf_macos__e2e_summary](https://ci.chromium.org/b/8688775233497234865)
- [x] [Mac_benchmark
basic_material_app_macos__compile](https://ci.chromium.org/b/8688775212414596785)
- [x] [Mac_benchmark
complex_layout_macos__start_up](https://ci.chromium.org/b/8688775198181888337)
- [x] [Mac_benchmark
complex_layout_scroll_perf_macos__timeline_summary](https://ci.chromium.org/b/8688773850790996993)
- [x] [Mac_benchmark
flutter_gallery_macos__compile](https://ci.chromium.org/b/8688773826409129377)
- [x] [Mac_benchmark
flutter_view_macos__start_up](https://ci.chromium.org/b/8688773773112767985)
- [x] [Mac_benchmark
hello_world_macos__compile](https://ci.chromium.org/b/8688773760727269169)
- [x] [Mac_benchmark
platform_view_macos__start_up](https://ci.chromium.org/b/8688773747621428417)
- [x] [Mac_benchmark
flutter_tool_startup__macos](https://ci.chromium.org/b/8688773787344192513)
- [x] [Mac_x64
build_tests_1_4](https://ci.chromium.org/b/8688777231345770529)
- [x] [Mac_x64
build_tests_2_4](https://ci.chromium.org/b/8688777216497738385)
- [x] [Mac_x64
build_tests_3_4](https://ci.chromium.org/b/8688777202214369297)
- [x] [Mac_x64
build_tests_4_4](https://ci.chromium.org/b/8688777185647496737)
- [x] [Mac_x64
ios_app_with_extensions_test](https://ci.chromium.org/b/8688774621940143137)
- [x] [Mac_x64
macos_chrome_dev_mode](https://ci.chromium.org/b/8688774597462648785)
- [x] [Mac_ios
animated_advanced_blend_perf_ios__timeline_summary](https://ci.chromium.org/b/8688777094221131537)
- [x] [Mac_ios
rrect_blur_perf_ios__timeline_summary](https://ci.chromium.org/b/8688777064000087553)
- [x] [Mac_ios
draw_arcs_all_fill_styles_perf_ios__timeline_summary](https://ci.chromium.org/b/8688777041025200385)
- [x] [Mac_ios
draw_arcs_all_stroke_styles_perf_ios__timeline_summary](https://ci.chromium.org/b/8688775537970255681)
- [x] [Mac_ios
draw_vertices_perf_ios__timeline_summary](https://ci.chromium.org/b/8688775520935099585)
- [x] [Mac_ios
draw_atlas_perf_ios__timeline_summary](https://ci.chromium.org/b/8688775504958221105)
- [x] [Mac_ios
static_path_tessellation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688774736260046321)
- [x] [Mac_ios
dynamic_path_tessellation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688774713031979665)
- [x] [Mac_ios
static_path_stroke_tessellation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688774695482874273)
- [x] [Mac_ios
dynamic_path_stroke_tessellation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688773629669853585)
- [x] [Mac_ios
animation_with_microtasks_perf_ios__timeline_summary](https://ci.chromium.org/b/8688773601089597473)
- [x] [Mac_ios
backdrop_filter_perf_ios__timeline_summary](https://ci.chromium.org/b/8688773584942724897)
- [x] [Mac_ios
channels_integration_test_ios](https://ci.chromium.org/b/8688773571254087873)
- [x] Mac_ios complex_layout_scroll_perf_ios__timeline_summary
- [x] [Mac_ios
color_filter_and_fade_perf_ios__e2e_summary](https://ci.chromium.org/b/8688773166210725681)
- [x] [Mac_ios
imagefiltered_transform_animation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688773151009869025)
- [x] [Mac_ios
external_ui_integration_test_ios](https://ci.chromium.org/b/8688773134565476161)
- [x] Mac_ios route_test_ios
- [ ] [Mac_ios
flavors_test_ios](https://ci.chromium.org/b/8688769248121472465)
- [x] Mac_ios flutter_gallery_ios__start_up
- [x] Mac_ios flutter_view_ios__start_up
- [x] Mac_ios integration_ui_ios_keyboard_resize
- [x] [Mac_ios
ios_defines_test](https://ci.chromium.org/b/8688774071442762129)
- [x] Mac_ios ios_platform_view_tests
- [x] [Mac_ios
large_image_changer_perf_ios](https://ci.chromium.org/b/8688774031240051537)
- [x] [Mac_ios
microbenchmarks_ios](https://ci.chromium.org/b/8688774547634994785)
- [x] Mac_ios native_assets_ios
- [x] [Mac_ios
new_gallery_skia_ios__transition_perf](https://ci.chromium.org/b/8688776417509425425)
- [x] [Mac_ios
platform_channel_sample_test_ios](https://ci.chromium.org/b/8688772159495774417)
- [x] Mac_ios platform_channels_benchmarks_ios
- [x] [Mac_ios
platform_interaction_test_ios](https://ci.chromium.org/b/8688772132549031473)
- [x] Mac_ios platform_view_ios__start_up
- [x] [Mac_ios
platform_views_scroll_perf_ios__timeline_summary](https://ci.chromium.org/b/8688770924854937297)
- [x] [Mac_ios
platform_views_scroll_perf_ad_banners__timeline_summary](https://ci.chromium.org/b/8688770911202009137)
- [x] [Mac_ios
platform_views_scroll_perf_bottom_ad_banner__timeline_summary](https://ci.chromium.org/b/8688770895354090081)
- [x] [Mac_ios
platform_views_scroll_perf_non_intersecting_impeller_ios__timeline_summary](https://ci.chromium.org/b/8688770878784490225)
- [x] [Mac_ios
post_backdrop_filter_perf_ios__timeline_summary](https://ci.chromium.org/b/8688770864215965681)
- [x] [Mac_ios
wide_gamut_ios](https://ci.chromium.org/b/8688772092281083761)
- [x] [Mac_ios
ios_debug_workflow](https://ci.chromium.org/b/8688773991399243601)
- [x] Mac_ios very_long_picture_scrolling_perf_ios__e2e_summary
- [x] Mac_ios spell_check_test
- [x] [Mac_x64_ios
integration_test_test_ios](https://ci.chromium.org/b/8688772067540844481)
- [x] [Mac_x64_ios
hot_mode_dev_cycle_ios__benchmark](https://ci.chromium.org/b/8688772048988479185)
- [x] [Mac_arm64_ios
basic_material_app_ios__compile](https://ci.chromium.org/b/8688772023490349601)
- [x] [Mac_arm64_ios
flutter_gallery_ios__compile](https://ci.chromium.org/b/8688772011072284625)
- [x] [Mac_arm64_ios
hello_world_ios__compile](https://ci.chromium.org/b/8688771998203648913)
- [x] [Mac_arm64_ios
imitation_game_flutter](https://ci.chromium.org/b/8688771982414426593)
- [x] [Mac_arm64_ios
imitation_game_swiftui](https://ci.chromium.org/b/8688771968308027601)

## 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.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
11 files changed
tree: 6571bdd23504cf4b0c8d6e62efaf569dd79b6d34
  1. .gemini/
  2. .github/
  3. .vscode/
  4. bin/
  5. buildtools/
  6. dev/
  7. docs/
  8. engine/
  9. examples/
  10. packages/
  11. third_party/
  12. .autoroller-preupload.sh
  13. .ci.yaml
  14. .gitattributes
  15. .gitignore
  16. analysis_options.yaml
  17. AUTHORS
  18. CHANGELOG.md
  19. CODE_OF_CONDUCT.md
  20. CODEOWNERS
  21. CONTRIBUTING.md
  22. dartdoc_options.yaml
  23. DEPS
  24. flutter_console.bat
  25. LICENSE
  26. PATENT_GRANT
  27. pubspec.lock
  28. pubspec.yaml
  29. README.md
  30. TESTOWNERS
README.md

Flutter CI Status Discord badge Twitter handle BlueSky badge codecov LFX Health Score CII Best Practices SLSA 1

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

Documentation

For release and other announcements, join the flutter-announce mailing list. Our documentation also tracks breaking changes across releases.

Terms of service

The Flutter tool may occasionally download resources from Google servers. By downloading or using the Flutter SDK, you agree to the Google Terms of Service: https://policies.google.com/terms

For example, when installed from GitHub (as opposed to from a prepackaged archive), the Flutter tool will download the Dart SDK from Google servers immediately when first run, as it is used to execute the flutter tool itself. This will also occur when Flutter is upgraded (e.g. by running the flutter upgrade command).

About Flutter

We think Flutter will help you create beautiful, fast apps, with a productive, extensible and open development model, whether you're targeting iOS or Android, web, Windows, macOS, Linux or embedding it as the UI toolkit for a platform of your choice.

Beautiful user experiences

We want to enable designers to deliver their full creative vision without being forced to water it down due to limitations of the underlying framework. Flutter‘s layered architecture gives you control over every pixel on the screen and its powerful compositing capabilities let you overlay and animate graphics, video, text, and controls without limitation. Flutter includes a full set of widgets that deliver pixel-perfect experiences whether you’re building for iOS (Cupertino) or other platforms (Material), along with support for customizing or creating entirely new visual components.

Fast results

Flutter is fast. It's powered by hardware-accelerated 2D graphics libraries like Skia (which underpins Chrome and Android) and Impeller. We architected Flutter to support glitch-free, jank-free graphics at the native speed of your device.

Flutter code is powered by the world-class Dart programming language, which enables compilation to 32-bit and 64-bit ARM machine code for iOS and Android, JavaScript and WebAssembly for the web, as well as Intel x64 and ARM for desktop devices.

Productive development

Flutter offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

Hot reload animation

Extensible and open model

Flutter works with any development tool (or none at all), and also includes editor plug-ins for both Visual Studio Code and IntelliJ / Android Studio. Flutter provides tens of thousands of packages to speed your development, regardless of your target platform. And accessing other native code is easy, with support for both FFI (on Android, on iOS, on macOS, and on Windows) as well as platform-specific APIs.

Flutter is a fully open-source project, and we welcome contributions. Information on how to get started can be found in our contributor guide.