Skip to content

[ios_widget_catalog_compare] Update SDK constraint, dependencies, lints - #238

Merged
Piinks merged 5 commits into
flutter:mainfrom
pjkammer:catalog-update
Oct 21, 2026
Merged

Piinks merged 5 commits into
flutter:mainfrom
pjkammer:catalog-update

Conversation

@pjkammer

@pjkammer pjkammer commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Brings ios_widget_catalog_compare up to date with Flutter 3.47, still on package:flutter/cupertino.dart. On main the app has no lint setup and no tests, and every iOS build rewrites tracked Xcode files.

Commits:

  1. Dependencies and lints. Set SDK constraint to ^3.13.0 (cupertino_ui's minimum), added flutter_lints and analysis_options.yaml from flutter create, then flutter pub upgrade --major-versions, which moves cupertino_icons to ^2.0.0 and supersedes Bump cupertino_icons from 1.0.9 to 2.0.0 in /ios_widget_catalog_compare #234. cupertino_icons stays because CupertinoSearchTextField draws its icons from that font.
  2. Analyzer fixes. dart fix --apply for 8 of the 11 findings. Small hand edits for the others.
  3. Added a widget smoke test. It mocks the event channel that the native side uses to select a control, and checks that each of the 10 controls appears when selected and that nothing is shown before a selection.
  4. dart format.
  5. Flutter's automatic iOS project migrations, from flutter build ios --simulator --debug, unmodified.

Tested with Flutter 3.47.7: flutter analyze, flutter test (11 tests) and dart format are clean, and a second iOS build changes nothing. On an iPhone 17 Pro simulator (iOS 26.4), choosing controls from the native picker shows the matching Flutter widget.

Unchanged: none of this changes how the app looks or behaves when built with Flutter 3.47.

There is no tracking issue. This is cleanup before the cupertino_ui migration (#240)

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.
    Adds a widget smoke test that selects each control the native side can request.
  • 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.

1. Copied analysis_options.yaml from `flutter create` (Flutter 3.47.7),
   minus the android/** exclude: this app has no android/ folder.
2. Hand edits to pubspec.yaml:
   - Raise SDK constraint to ^3.13.0 to match cupertino_ui.
   - Add flutter_lints ^6.0.0.
3. flutter pub upgrade --major-versions
   - raises cupertino_icons from ^1.0.9 to ^2.0.0
`flutter analyze` reported 11 issues.

1. `dart fix --apply` fixed 8: unnecessary_const,
   prefer_const_constructors_in_immutables, unnecessary_this (4),
   prefer_interpolation_to_compose_strings (2).
2. Hand edits for the other 3:
   - library_private_types_in_public_api: createState() returns
     State<FlutterDemo>
   - avoid_print: print -> debugPrint (2), keeping the logging.

Since this is a debugging tool, I looked at whether having the print was
helpful and should be left as is, but my impression is that debugPrint
doesn't fundamentally change the behavior.
The app had no tests, so `flutter test` failed with
`Test directory "test" not found.`

The test mocks the overlay_ios.flutter.io/responder event channel the
way the native side uses it, once for each of the 10 controls it can
select, checking that the matching widget appears, and once without a
selection, checking that no control is shown.
Generated with `dart format .` (Dart 3.13.5)
Generated by `flutter build ios --simulator --debug` on Flutter 3.47.7

No hand edits. Tool output:
```
Resolving dependencies...
Downloading packages...
  material_color_utilities 0.13.0 (0.13.1 available)
  test_api 0.7.12 (0.7.15 available)
Got dependencies!
2 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Building com.example.overlayIos for simulator (ios)...
Updating minimum iOS deployment target to 15.0.
Upgrading project.pbxproj
Upgrading AppFrameworkInfo.plist
Updating project for Xcode compatibility.
Upgrading project.pbxproj
Upgrading Runner.xcscheme
Upgrading Info.plist
Removing script build phase dependency analysis.
Adding input path to Thin Binary build phase.
ios/Runner/AppDelegate.swift uses the deprecated @UIApplicationMain attribute, updating.
Upgrading Runner.xcscheme
To ensure your app continues to launch on upcoming iOS versions, UIScene lifecycle support will soon be required. Please see https://flutter.dev/to/uiscene-migration for the migration guide.

Running Xcode build...
Xcode build done.                                            9.6s
✓ Built build/ios/iphonesimulator/Runner.app
```
@pjkammer
pjkammer marked this pull request as ready for review October 20, 2026 19:01

@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 7168c16 into flutter:main Oct 21, 2026
7 checks passed
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