Skip to content

Fix Material library replacement fix-data keys#149

Merged
justinmc merged 1 commit into
justinmc:deprecate-designfrom
MarlonJD:material-ui-dart-fix-casing
Jun 3, 2026
Merged

Fix Material library replacement fix-data keys#149
justinmc merged 1 commit into
justinmc:deprecate-designfrom
MarlonJD:material-ui-dart-fix-casing

Conversation

@MarlonJD

Copy link
Copy Markdown

This is a small follow-up for flutter#186915.

The new library replacement transform currently uses replacedby / newlibrary. With that exact syntax, analyzer reports the deprecated package:flutter/material.dart import, but dart fix --dry-run reports Nothing to fix!.

Changing the keys to replacedBy / newLibrary makes dart fix offer and apply the Material migration.

Manual fixture coverage:

  • current syntax: dart fix --dry-run -> Nothing to fix!
  • patched syntax: dart fix --dry-run -> fixes for normal imports, show, hide, prefixed imports, and the missing material_ui dependency in pubspec.yaml

export 'package:flutter/material.dart' remains a separate unsupported case.

@justinmc justinmc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you for fixing this! You're right about the key names.

@justinmc
justinmc merged commit 8817291 into justinmc:deprecate-design Jun 3, 2026
1 check 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