Skip to content

fix: migrate to material_ui and cupertino_ui packages - #207

Open
SlayerOrnstein wants to merge 3 commits into
yako-dev:masterfrom
SlayerOrnstein:ui-migration
Open

SlayerOrnstein wants to merge 3 commits into
yako-dev:masterfrom
SlayerOrnstein:ui-migration

Conversation

@SlayerOrnstein

Copy link
Copy Markdown

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
Author

Yeah that makes sense, give me a quick sec

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