Part of https://github.com/flutter/flutter/issues/145009
This is part one of the wiki migration.
This moves all wiki pages wholesale into the new docs directory with no changes.
Follow up PRs will sort them, updating breadcrumbs and links.
This PR is step 12 in the journey to solve issue #136139 and make the
entire Flutter repo more readable.
Most of it involves implementing switch expressions, and there's also a
few other random things that I wanted to clean up a bit.
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Updates `examples/api/lib/widgets/animated_size/animated_size.0.dart` API example by using `SizedBox` to size the surrounding of the `FlutterLogo` while setting the constant `FlutterLogo` size. This was done because `FlutterLogo` already has size animation under the hood, and the main goal of this example is to show `AnimatedSize` usage
- Adds test for `examples/api/lib/widgets/animated_size/animated_size.0.dart`
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Updates `examples/api/lib/widgets/async/stream_builder.0.dart`
- Adds test for `examples/api/lib/widgets/async/stream_builder.0.dart`
DDS was temporarily pinned to 4.1.0 because 4.2.0 triggered some test
failures (see https://github.com/flutter/flutter/pull/147250). Those
failures should be fixed by vm_service 14.2.2, so this unpins DDS and
rolls both of these packages (along with devtools_shared, which is a DDS
dependency).
(If the bot updates vm_service before this is done, I can rebase over
that will reduce the size of this PR to just a few files)
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Corrects the name for `examples/api/test/widgets/shortcuts/callback_shortcuts.0_test.dart` test file
- Update tests for `examples/api/lib/widgets/shortcuts/callback_shortcuts.0.dart`
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Adds tests for `examples/api/lib/widgets/shortcuts/shortcuts.0.dart`
- Adds tests for `examples/api/lib/widgets/shortcuts/shortcuts.1.dart`
## Description
This introduces a list of packages that we will explicitly not pin. It is to be used for things where the package isn't actually published, but is a transitive dependency of another package included in the SDK. This happens with the `macros` package, for instance, which depends on the private, unpublished, `_macros` package where the SDK does some tricky things to depend on it (it depends on "any", but ships it as part of the SDK).
Also ran `flutter update-packages --force-update` to update all of the pubspec files.
## Related Issues
- Fixes#147656
## Tests
- Added a test that makes sure that explicitly unpinned packages don't show up in the pinned list.
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Fixes name of the `examples/api/lib/widgets/shortcuts/single_activator.single_activator.0.dart`
- Adds tests for `examples/api/lib/widgets/shortcuts/single_activator.0.dart`
- added language for all code blocks
- replaced `bash` or `shell` with `sh` for consistency.
- added `sh` and `console` in the GitHub template link generator.
- updated test for GitHub template.
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Adds `examples/api/lib/widgets/shortcuts/character_activator.0.dart` test
- Fixes the description of the `examples/api/lib/widgets/shortcuts/character_activator.0.dart` example
Refactor the framework + test harness test suites in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing tests
The refactor of both suites included in this PR because they both depended on util functions and variables that also needed to be refactored.
Part of https://github.com/flutter/flutter/issues/145482
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Adds `examples/api/test/widgets/gesture_detector/gesture_detector.0_test.dart` test
- Adds `examples/api/test/widgets/gesture_detector/gesture_detector.1_test.dart` test
This PR adds initial support for Swift Package Manager (SPM). Users must opt in. Only compatible with Xcode 15+.
Fixes https://github.com/flutter/flutter/issues/146369.
## Included Features
This PR includes the following features:
* Enabling SPM via config
`flutter config --enable-swift-package-manager`
* Disabling SPM via config (will disable for all projects)
`flutter config --no-enable-swift-package-manager`
* Disabling SPM via pubspec.yaml (will disable for the specific project)
```
flutter:
disable-swift-package-manager: true
```
* Migrating existing apps to add SPM integration if using a Flutter plugin with a Package.swift
* Generates a Swift Package (named `FlutterGeneratedPluginSwiftPackage`) that handles Flutter SPM-compatible plugin dependencies. Generated package is added to the Xcode project.
* Error parsing of common errors that may occur due to using CocoaPods and Swift Package Manager together
* Tool will print warnings when using all Swift Package plugins and encourage you to remove CocoaPods
This PR also converts `integration_test` and `integration_test_macos` plugins to be both Swift Packages and CocoaPod Pods.
## How it Works
The Flutter CLI will generate a Swift Package called `FlutterGeneratedPluginSwiftPackage`, which will have local dependencies on all Swift Package compatible Flutter plugins.
The `FlutterGeneratedPluginSwiftPackage` package will be added to the Xcode project via altering of the `project.pbxproj`.
In addition, a "Pre-action" script will be added via altering of the `Runner.xcscheme`. This script will invoke the flutter tool to copy the Flutter/FlutterMacOS framework to the `BUILT_PRODUCTS_DIR` directory before the build starts. This is needed because plugins need to be linked to the Flutter framework and fortunately Swift Package Manager automatically uses `BUILT_PRODUCTS_DIR` as a framework search path.
CocoaPods will continue to run and be used to support non-Swift Package compatible Flutter plugins.
## Not Included Features
It does not include the following (will be added in future PRs):
* Create plugin template
* Create app template
* Add-to-App integration
Refactor framework coverage tests in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing framework coverage tests
Part of https://github.com/flutter/flutter/issues/145482
Move from `test.dart` into new `runner_utils.dart` file:
- shard calculation related methods + `shuffleSeed` logic
- env variable flag calculation
- runner wrapper methods `runDartTest` and `_runFromList`
Create web tests suite class containing:
- web long running tests
- runWebHtmlUnitTests
- runWebCanvasKitUnitTests
- runWebSkwasmUnitTests
- the associate helper methods with the above