Skip to content

fix: migrate to material_ui and cupertino_ui packages - #207

Merged
yadaniyil merged 8 commits into
yako-dev:masterfrom
SlayerOrnstein:ui-migration
Sep 24, 2026
Merged

yadaniyil merged 8 commits into
yako-dev:masterfrom
SlayerOrnstein:ui-migration

Conversation

@SlayerOrnstein

Copy link
Copy Markdown
Contributor

Connection with issue(s)

Resolve issue #206

Connected to #???

Testing and Review Notes

Bumped the constraints for both Flutter and Dart SDK to the initial decoupling then ran dart fix --apply --code=migrate_design_widgets

Made sure to run test and check out the examples, I also wasn't sure but I made sure the abstract classes imported widgets from flutter instead of the ui packages

Screenshots or Videos

To Do

  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers
  • request the "UX" team perform a design review (if/when applicable)

@qeepcologne qeepcologne left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

+1 — straightforward, and it matches what we did in our own apps (same dart fix --apply --code=migrate_design_widgets route). We are running this branch pinned by commit in an app right now, so it works end to end.

One nit: the SDK floor is raised further than anything here needs. The PR goes to flutter: ">=3.47.0" / sdk: ">=3.13.0", but every 1.x of both new dependencies declares:

environment:
  sdk: ^3.12.0
  flutter: ">=3.44.0"

That holds for material_ui 1.0.0 through 1.2.0 and cupertino_ui 1.0.0 through 1.0.2 — nothing in the dependency graph asks for 3.47. Checked by lowering the constraints to sdk: ">=3.12.0 <4.0.0" / flutter: ">=3.44.0" and running flutter pub downgrade to force the lowest allowed versions (material_ui 1.1.1, cupertino_ui 1.0.2): flutter analyze lib/ is clean. Caveat on that check — it ran on Flutter 3.47.4, so the analyzer enforced language version 3.12 (which would catch newer syntax) but did not compile against the 3.44 framework. Given the diff is import swaps only and the code itself is unchanged from a base that supported >=3.16.0, that seems safe.

Worth lowering because >=3.47.0 locks out every consumer on 3.44–3.46 who could otherwise take the migrated package, and those are exactly the users who benefit: material_ui works alongside the still-present in-SDK Material on those versions.

(The flutter_lints: ^6.0.0 bump is dev-only, so it does not affect consumers either way.)

@SlayerOrnstein

Copy link
Copy Markdown
Contributor Author

Yeah that makes sense, give me a quick sec

@qeepcologne

Copy link
Copy Markdown

@yadaniyil is anything still blocking this one? From the outside it looks ready:

  • the only nit from my review is addressed — 80c2c1e lowers the floor back to sdk: ">=3.12.0" / flutter: ">=3.44.0", so consumers on 3.44–3.46 are not locked out
  • the PR is MERGEABLE, no conflicts against master
  • the one required check ("Check PR title") sits at action_required — it needs Approve and run workflows from a maintainer before it can turn green, so it cannot pass on the contributor's side

We have been running this branch pinned by commit in a shipping app since it was opened, so the migration works end to end. Would you be able to merge it and cut a release? Everyone on the published 3.0.1 currently cannot build against material_ui / cupertino_ui, which makes the package unusable on current Flutter without a git pin.

yadaniyil and others added 5 commits September 24, 2026 15:18
SettingsList now reads Theme and CupertinoTheme from material_ui and
cupertino_ui. In an app still on package:flutter/material it silently
falls back to default colors, so print a one-time hint in debug builds.

Adds tests that colors, dark mode and platform follow a material_ui /
cupertino_ui app theme (yako-dev#206).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Document the new Flutter 3.44 / material_ui requirement and point apps
that have not migrated to settings_ui ^3.0.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flutter format was removed from Flutter, so the Code Quality job failed
on every push.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iOS 27 requires the UIScene lifecycle, so the example would not launch.
Regenerated example/ios from the current Flutter template (same bundle
ID and app icons). Also fixes the dark mode integration test, which
expected a Material Switch where iOS shows a CupertinoSwitch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yadaniyil
yadaniyil merged commit 3fba98e into yako-dev:master Sep 24, 2026
1 check passed
@yadaniyil

Copy link
Copy Markdown
Contributor

Merged — thanks a lot @SlayerOrnstein for the migration, and @qeepcologne for the review and for testing it in a real app. That really helped.

Before merging I added a few commits on top:

  • ran dart format for the new Dart version
  • bumped to 4.0.0 with CHANGELOG and README notes (Flutter 3.44+, app must use material_ui / cupertino_ui, otherwise stay on ^3.0.1)
  • tests that colors, dark mode and platform follow a material_ui / cupertino_ui theme (Color scheme not taken from main app in Flutter 3.47.0 with decoupled material_ui #206)
  • a one-time debug warning when SettingsList can't find a material_ui / cupertino_ui theme
  • CI now uses dart format (flutter format no longer exists)
  • example iOS app moved to the UIScene lifecycle so it runs on iOS 27

Tested on Android and iOS, light and dark: all example screens look the same as 3.0.1, and all tests pass on Flutter 3.44 and 3.47.

It'll go out as 4.0.0 on pub.dev.

@yadaniyil

Copy link
Copy Markdown
Contributor

settings_ui 4.0.0 with your material_ui migration is now on pub.dev: https://pub.dev/packages/settings_ui/versions/4.0.0. Thanks again!

iWisp360 pushed a commit to iWisp360/flutter-settings-ui that referenced this pull request Sep 30, 2026
…the docs

- 3.x never upper-cased iOS headers; apps passed ALL-CAPS titles.
- Breaking changes: Linux tests must find AdwaitaSettingsSwitch, and the
  default side padding follows the list's width.
- Credit yako-dev#207 and yako-dev#201/yako-dev#202, link the old macOS, Windows and iPad
  requests.
- Documentation: the README rewrite, llms.txt and AGENTS.md. Example app:
  the showcase screen, and `cd example` before --route.
- The date stays Unreleased until the day of publishing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants