Skip to content

feat: support material ui - #1035

Merged
mvanbeusekom merged 2 commits into
Baseflow:developfrom
Segatti:develop
Aug 28, 2026
Merged

mvanbeusekom merged 2 commits into
Baseflow:developfrom
Segatti:develop

Conversation

@Segatti

@Segatti Segatti commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Breaking change / feature — major version bump to add Wasm compatibility via material_ui, plus test and analyzer fixes.

⤵️ What is the current behavior?

Images breaking on the first load or when trying to retrieve them from the cache in Flutter 3.47.0.

🆕 What is the new behavior (if this is a feature change)?

  • Replaces flutter/material.dart with material_ui across all packages (cached_network_image, cached_network_image_platform_interface, cached_network_image_web) for improved
    Wasm compatibility
  • Bumps minimum requirements to Flutter >=3.44.0 and Dart ^3.12.0
  • Uses conditional imports for createImageCodecFromUrl in the web package (web implementation vs. VM stub) so tests compile and run on the VM
  • Adds platform folder exclusions to analysis_options.yaml
  • Fixes FakeTicker test helper with the forceFrames property required by newer Flutter versions
  • Adds pubspec_overrides.yaml for local monorepo development
    Version bump:
    | Package | Previous | New |
    |---------|----------|-----|
    | cached_network_image | 3.4.1 | 4.0.0 |
    | cached_network_image_web | 1.3.1 | 2.0.0 |
    | cached_network_image_platform_interface | 4.1.1 | 5.0.0 |

💥 Does this PR introduce a breaking change?

Yes.

  • Requires Flutter >=3.44.0 and Dart ^3.12.0 (via material_ui dependency)
  • Adds material_ui as a direct dependency in all packages
  • Major version bumps in all three packages
  • The public API (CachedNetworkImage, callbacks, etc.) remains unchanged, but consumers on Flutter <3.44 cannot resolve dependencies with the new versions
    Release order on pub.dev:
  1. cached_network_image_platform_interface 5.0.0
  2. cached_network_image_web 2.0.0
  3. cached_network_image 4.0.0

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated
  • Rebased onto current develop

@mvanbeusekom mvanbeusekom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, just a question on the pubspec_overrides.yaml file.

Comment thread cached_network_image/pubspec_overrides.yaml Outdated
@Segatti
Segatti requested a review from mvanbeusekom August 27, 2026 05:19
@mvanbeusekom
mvanbeusekom merged commit 9062ac5 into Baseflow:develop Aug 28, 2026
5 of 20 checks passed
@mvanbeusekom

Copy link
Copy Markdown
Member

Thank you very much for the PR. It has been merged and published, the new version of the different packages should now be available.

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