Skip to content

Commit 0c30762

Browse files
committed
flutter/flutter material and cupertino code setup.
A single squashed commit of all work after the code copy. Puts the code in the right place and sets it all up properly in the new repo. Move all copied code to its correct location. Material exports Cupertino imports. Also, fix some relative imports in Cupertino by making them import via package. Set up material_ui_examples package. All example tests pass Fix material_ui_examples readme paths Set up cupertino_ui_examples package. All cupertino example tests pass. Fixed dependency from old flutter_api_examples to new cupertino_ui_examples. material_ui import cupertino_ui in main code publish_to: none material_ui_examples references new packages correctly, and tests pass. material_ui test directory organization I think the conflicts were files that were added with a freeze override since I last tried this PR. cupertino_ui_examples references new packages correctly, and tests pass. Additional files for fix_data and test_fixes directories material_ui tests import material_ui/material_ui.dart. Doc import from material.dart to material_ui.dart Test fixes import material_ui/material_ui.dart. Imports updated in material_ui dart fixes. One was deleted because its dart fix is actually in widgets, not material. Imports updated in cupertino_ui dart fixes. drag_target deleted because it is widgets-only. Many widgets-only fixes were removed from cupertino.dart. Migrate cupertino imports in cupertino_ui tests Same tests pass as before. Migrate docImports of Material in cupertino_ui. material_ui tests import cupertino_ui correctly. Skip cupertino_ui test files that fail due to cross imports. Skip cupertino_ui test files that fail due to cross imports. Match main formatting difference with flutter/flutter. Fix duplicate publish_to Cupertino test directory structure matches material's Move examples to the canonical location. Per @chunhtai. Following the example of go_router. Clean up a path dependency. Was expecting to be inside the flutter/flutter repo directory structure. Correct path for example workspace Fix failure due to flutter_test's byTooltip finder. flutter_test uses flutter/material.dart, and the byTooltip finder does `is Tooltip`. Because this package's Tooltip and flutter/material.dart's Tooltip are not the same thing, that check was always returning false. Correct license header for flutter/packages in material_ui. Correct license header for flutter/packages in cupertino_ui. Language annotations on code blocks in readmes CI config files Exclude test_fixes directories from analyzer. As is done in flutter/flutter currently. Don't analyze test files that have been skipped due to cross imports. Fix cupertino_ui analyzer errors Mostly missing dependencies. Fix material_ui analyzer errors, except for import alphabetizing Fix material_ui analyzer import statement alphabetization. Use version of vector_math from the code freeze, not now. Packages should depend on 3.44.0 and above. The first stable release with the frozen Material/Cupertino code. Fix analyzer issues for cupertino_ui. These don't appear locally for some reason, only on CI. I'm concerned about adding all of these awaits. I worry some tests might not complete. analyzer errors in material_ui. dart format . Now the analysis_options.yaml should be totally in sync with flutter/flutter. Revert "dart format ." This reverts commit 536bda6. Repo-wide format on master. Command: dart ./script/tool/bin/flutter_plugin_tools.dart format There were some changes in other packages that I ignored. No batch for now until post 1.0.0. Correct dart version for sdk version. Exceptions for clock and material_color_utilities dart fix --apply It looks like it fixed even more stuff than was showing up on CI. We'll see if that triggers analyzer warnings or not. Revert "dart fix --apply" This reverts commit cf2c83f. This resulted in even more errors in CI. I will manually make the code changes to pass CI. I think that's all cupertino_ui analyzer warnings. Done by hand. All CI analyze errors should be fixed, thanks for Gemini. It actually terminated early but it looks like it touched every file at least. Fix analyzer failures from CI. Manually, just by looking at CI errors on Luci. The one last analyzer issue? Formatting from repo_checks CI check. All I did was open these files in my editor and let it autoformat them, which looks like it should be doing exactly what CI is telling me to do. Fix repo check for minimum allowable dart version. Test: Do we still have to await everything? Given the recent changes updating analysis_options, let's see if the analyzer passes if I don't await this. Fix timeouts caused by new awaits in cupertino_ui. I put these awaits in naively to work around analyzer failures. They should have been unawaited instead. Things I unawaited: Navigator.push (many) Navigator.pushNamed (many) AnimationController.forward (only 1) Fix timeouts caused by new awaits in material_ui. Same as the cupertino commit before this. Undo repo-wide changes, to do in a separate PR and then update this PR. The point is to avoid triggering the CI logic that runs all tests. Some missing formatting. Fix example test failures happening on web. One was due to a platform quirk of web dropping the ".0" from "0.0" on web. In the other, state restoration seemed to not work at all. I found an old issue about it and cases in other tests where it is skipped on web. Move skipped tests to a temporary directory. These tests have compile errors in them. It seemed like we didn't need to move them since I skipped them in analysis_options.dart, but when running `flutter test --platform=chrome`, it did try to compile them, even though other platforms did not. So I had to move them. No more `final` in parameter lists. Not sure how this was missed when everything else was migrated. WIP Fix web example tests Failing due to platform inconsistencies. I fixed some of these before but somehow missed these ones. Formatting Skip menu anchor and chip tests failing on web. Not sure why they don't work, whether it's a bug or a platform difference that the test should accommodate. I've created an issue for each and linked to them. I think I incorrectly did some merge conflicts when I cherry-picked .repo_tool_config.yaml and custom_analysis.yaml, so I've undone those changes.
1 parent 7f7b824 commit 0c30762

1,201 files changed

Lines changed: 13408 additions & 13431 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/api/test/material/flexible_space_bar/flexible_space_bar.0_test.dart

Lines changed: 0 additions & 45 deletions
This file was deleted.

examples/api/test/material/menu_anchor/menu_anchor.1_test.dart

Lines changed: 0 additions & 149 deletions
This file was deleted.

examples/api/test/material/platform_menu_bar/platform_menu_bar.0_test.dart

Lines changed: 0 additions & 134 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
include: ../../analysis_options.yaml
2+
3+
analyzer:
4+
exclude:
5+
- "test_fixes/**"
6+
# TODO(justinmc): Remove the following exclusion when cross-imports are
7+
# fixed. See https://github.com/flutter/flutter/issues/177028.
8+
- "temporarily_disabled_tests/**"
9+
10+
formatter:
11+
page_width: 100
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# TODO(stuartmorgan): Remove this; see https://github.com/flutter/flutter/issues/102679
2+
exempt_from_excerpts: true
3+
release:
4+
batch: false
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Unused platform specific files
2+
android/
3+
ios/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "89172fc6152056af222e0afcf6e2d6ee4e9f6f8f"
8+
channel: "master"
9+
10+
project_type: package

0 commit comments

Comments
 (0)