Skip to content

Migrate to Flutter 3.47 and Dart 3.13, support material_ui, release 5.0.0-dev.1 - #25

Merged
rydmike merged 56 commits into
masterfrom
v5-0-0-for-flutter-3-47
Aug 24, 2026
Merged

rydmike merged 56 commits into
masterfrom
v5-0-0-for-flutter-3-47

Conversation

@rydmike

@rydmike rydmike commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Motivation

Migrate FlexSeedScheme to Flutter 3.47 and Dart 3.13 and prepare the 5.0.0-dev.1 release. Per Flutter's official recommendation the bump of the required Flutter SDK makes this a major release, even though it contains no breaking or new APIs. The dev release is published first to verify pub pana scoring, the Codecov upload and the web demo deploy before the official 5.0.0.

Functional changes

Migration

  • Requires Flutter 3.47.0 / Dart 3.13.0. Full support for the SDK decoupled material_ui and cupertino_ui packages.
  • Fixed the Dart 3.13 compile-time break (final/var on normal function parameters, now reserved for primary constructors) and all new Dart 3.13 lints. Moved to RydMike lints 3.0.0 with page_width: 120 formatting (large mechanical diffs).
  • Example app: iOS/macOS builds migrated from CocoaPods to Swift Package Manager; temporary MaterialUiCompatibilityBridge for the not-yet-migrated FlexColorPicker (to be removed in 5.0.1).
  • MCU fork verified at parity with MCU 0.13.1 (Flutter 3.47 pins 0.13.0).

Bug fixes (the only produced-color change)

  • FlexTones.surfaceTintTone is now actually applied to the produced ColorScheme.surfaceTint on the tones path, as always intended. Previously surfaceTint was always assigned primary. Changes surfaceTint only, for ultraContrast, candyPop, chroma and custom FlexTones where surfaceTintTone != primaryTone. Visual impact is minimal (elevation overlay only). Documented under BREAKING in the changelog.
  • FlexTones.useCam16 was missing from copyWith, operator ==, hashCode and debugFillProperties. Fixed; produces no color changes (Cam16.fromInt and Hct.fromInt return identical hue/chroma), but equality previously reported configs differing only in useCam16 as equal.
  • The MCU-path surfaceTint fallback deliberately stays MaterialDynamicColors.primary for ColorScheme.fromSeed parity; now documented in code so it is not mistaken for a bug.

Documentation

  • Codebase-wide stale-docs audit, verified against code: core API dartdoc, the MCU fork comments (deliberate divergences from upstream text are logged in the mcu-fork-sync skill reference), FlexSchemeVariant UI info strings (description/configDetails), example app comments and UI texts, tests, CONTRIBUTING, workflow comments.
  • README overhaul: corrected stale claims (twelve predefined FlexTones, removed pre-2.0 chroma clamp narrative, resolved Flutter/MCU speculation, broken code sample), added a Version 5.0.0 note, a respectMonochromeSeed headline bullet and a Color Channel Getters section. All screenshots intentionally unchanged.

Tests and coverage

  • 1006 tests (up from 982). 100% line coverage, now also clean in branch-aware IDE coverage.
  • New full-scheme golden locks for candyPop and chroma; expressive opt-out branch lock; useCam16 regression tests; 14 MCU coverage:ignore markers replaced with real tests (DynamicColor tone edge cases, TemperatureCache, Score fallback, QuantizerWsmeans empty cluster). Remaining ignores sit on verified dead code only.

Packaging and CI

  • dart pub publish dry run: 0 warnings. Untracked the Flutter-tool-generated example platform files (current template practice) and added a root .pubignore; published archive shrinks from 13 MB to ~0.5 MB.
  • CI: codecov-action bumped from EOL v3 to v5 (file: → files:); stale workflow comments fixed.
  • Agent config: skills tuned from real use, new release skill, stale-info trap list in the docs skill.

Verification

  • fvm dart analyze: no issues (package and example)
  • dart format --set-exit-if-changed: clean
  • fvm flutter test --coverage: 1006/1006 pass, 100% line coverage
  • dart pub publish --dry-run: 0 warnings, 508 KB archive

API and behavior risk

No public API additions, removals or signature changes; FlexColorScheme inherits this surface unchanged. Produced ColorSchemes are byte-identical to 4.x except the surfaceTint fix above. FlexSchemeVariant UI string updates are documented patch-level changes. The v5 web demo link goes live when the GitHub release for 5.0.0-dev.1 triggers the deploy workflow.

rydmike added 30 commits August 22, 2026 19:41
…create huge code diff when all lints are corrected
…t compile breaking Dart 3.13 final on parameters.
…ed FlexColorPicker lib needs it until it is also upgraded.
rydmike added 21 commits August 23, 2026 22:22
… v5.0.0-dev.1 just because we will publish a dev release of the pkg first
…am16` property was missing from `copyWith`, `operator ==`, `hashCode` and `debugFillProperties`.
…olor awkward-zone tone 60 branch

Covers the last IDE-reported coverage misses:
- CorePalette and CorePalettes operator == identical(this, other) short
  circuits via self comparison tests, plus explicit CorePalette equality
  and hashCode checks.
- DynamicColor.getTone isBackground awkward-zone adjustment to tone 60,
  taken when tone 49 cannot reach the required contrast ratio against a
  dark background. The existing test only covered the tone 49 branch.

These lines carry no DA records in flutter test --coverage lcov output,
so they only show up in branch-aware IDE coverage tooling. All lib/src
files now report 100% coverage there as well.
… reduced the published package archive from 13 MB to about 0.5 MB.

Untracked the git-ignored, Flutter tool generated example platform files (`generated_plugin_registrant.*`, `generated_plugins.cmake` and `GeneratedPluginRegistrant.swift` for Windows, Linux and macOS). They are regenerated by `flutter pub get` and builds, and current Flutter project templates git-ignore them. They are no longer part of the published package either.
  - Added a root `.pubignore`. It restates the publishing-relevant `.gitignore` rules (a `.pubignore` replaces the `.gitignore` in the same directory for publishing decisions) and additionally excludes internal repository content from the published archive: `AGENTS.md`, `docs/`, `scripts/`, and the image folders `doc_assets/` and `example/screenshots/`. The README references its images via absolute GitHub URLs, so pub.dev does not need them in the archive. Excluding `docs/` also resolves the pub layout warning about a plural top-level docs directory.
@rydmike rydmike self-assigned this Aug 24, 2026
@github-project-automation github-project-automation Bot moved this to In progress in FlexColorScheme Aug 24, 2026
@rydmike rydmike added this to the 5.0.0 milestone Aug 24, 2026
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (aa7be70) to head (a3278a2).

Additional details and impacted files
@@            Coverage Diff             @@
##            master       #25    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           43        43            
  Lines         2916      2770   -146     
==========================================
- Hits          2916      2770   -146     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rydmike
rydmike merged commit 0215b0b into master Aug 24, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in FlexColorScheme Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update fromSeeds( to return ColorScheme from material_ui instead of material of the SDK

1 participant