Skip to content

[ios_widget_catalog_compare] Migrate to cupertino_ui - #240

Merged
Piinks merged 2 commits into
flutter:mainfrom
pjkammer:catalog-cupertino-ui
Oct 21, 2026
Merged

Piinks merged 2 commits into
flutter:mainfrom
pjkammer:catalog-cupertino-ui

Conversation

@pjkammer

@pjkammer pjkammer commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Migrates ios_widget_catalog_compare from package:flutter/cupertino.dart to package:cupertino_ui/cupertino_ui.dart, the new location of the Cupertino widgets.

Commits, both unmodified tool output:

  1. Add the dependency. flutter pub add cupertino_ui, which adds cupertino_ui: ^1.1.3.
  2. Switch the imports. dart fix --apply --code=migrate_design_widgets --code=directives_ordering switches lib/main.dart and test/smoke_test.dart, and sorts lib/main.dart's imports.

Screenshots of the Flutter side of all 10 controls on an iPhone 17 Pro simulator (iOS 26.4) are the same before and after this change, below the status bar:

pairs

Tested with Flutter 3.47.7: flutter analyze, flutter test (11 tests) and dart format are clean, no package:flutter/cupertino.dart import is left, and an iOS build changes no tracked files.

Part of flutter/flutter#172942

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
    Updates the widget smoke test from [ios_widget_catalog_compare] Update SDK constraint, dependencies, lints #238 to import cupertino_ui and check for its widget types.
  • All existing and new tests are passing.
    No CI runs tests here. Locally, flutter test passes (11 tests).

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

cupertino_ui is the new location of the Cupertino widgets. The imports
switch on a subsequent commit.

Generated with `flutter pub add cupertino_ui` (Flutter 3.47.7), which
added cupertino_ui ^1.1.3. That version needs Flutter 3.47.0 or later,
and the lock now records it.
Generated with this command (Dart 3.13.5):

dart fix --apply --code=migrate_design_widgets --code=directives_ordering

migrate_design_widgets switches the imports, and directives_ordering
sorts them. Neither lint is enabled in this app. --code turns each on
for this run.
@pjkammer
pjkammer force-pushed the catalog-cupertino-ui branch from 7b2d411 to d819ef7 Compare October 21, 2026 16:44
@pjkammer
pjkammer marked this pull request as ready for review October 21, 2026 16:49

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Piinks
Piinks merged commit 02b4001 into flutter:main Oct 21, 2026
7 checks passed
@pjkammer
pjkammer deleted the catalog-cupertino-ui branch October 21, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants