[cupertino_ui] fix material_ui cross imports in cupertino_ui samples#12228
[cupertino_ui] fix material_ui cross imports in cupertino_ui samples#12228navaronbracke wants to merge 5 commits into
Conversation
| test: ^1.31.0 | ||
| vector_math: ^2.2.0 | ||
| web: ^1.1.1 | ||
| cupertino_icons: ^1.0.9 |
There was a problem hiding this comment.
Since the examples were relying on the Material Icons, I opted to switch to CupertinoIcons to fix those cross imports.
There was a problem hiding this comment.
Code Review
This pull request removes material_ui imports and dependencies from the cupertino_ui package examples and tests, replacing Material widgets, icons, and colors with Cupertino equivalents. The reviewer suggests removing the unused material_ui dependency from pubspec.yaml to clean up the configuration.
| cupertino_icons: ^1.0.9 | ||
| cupertino_ui: | ||
| path: .. | ||
| material_ui: |
There was a problem hiding this comment.
This is not true, since there are @docImports of material_ui, which this PR does not fix.
| } | ||
|
|
||
| class _TextMagnifierExampleAppState extends State<TextMagnifierExampleApp> { | ||
| late final controller = TextEditingController(text: widget.text); |
There was a problem hiding this comment.
This one was not disposed :(
| const Duration durationBetweenActions = Duration(milliseconds: 20); | ||
| const String defaultText = 'I am a magnifier, fear me!'; | ||
|
|
||
| Future<void> showMagnifier(WidgetTester tester, int textOffset) async { |
There was a problem hiding this comment.
For CupertinoTextField, instead of double tapping the word, I had to use long press to make it show up.
This PR fixes cross imports of Material / material_ui in the cupertino_ui API examples.
Doc imports for
material_uiare left as is, since I'm not sure what to do with those yet.This was originally flagged in flutter/flutter#187662
because the new checker flagged 4 of the examples having cross imports.
Note: the generic
text_magnifiersample was not flagged by the PR above, but it did have a cross import.This is because the example was in the wrong place as noted by a1682d4
See https://github.com/flutter/flutter/pull/187662/changes#diff-44a841a9d512f4332f43cceddafbe29069dfaea081ae0adad3a9990c13816006R123-R126
Part of flutter/flutter#187645
Since the Code Freeze period is still ongoing, I did not chance the version for cupertino_ui in the changelog yet.
Pre-Review Checklist
[shared_preferences]///).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. Comments from the
gemini-code-assistbot 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.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2