Skip to content

refactor: drop material.dart from plugin - #794

Merged
jokerttu merged 1 commit into
patrol-event-timeoutsfrom
plugin-widgets-import
Nov 6, 2026
Merged

jokerttu merged 1 commit into
patrol-event-timeoutsfrom
plugin-widgets-import

Conversation

@jokerttu

@jokerttu jokerttu commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Moves the plugin off package:flutter/material.dart, which Flutter deprecates after 3.47 in favor of package:material_ui (migration guide).

  • lib/ imports package:flutter/widgets.dart instead. The only Material symbol it used was Colors.black as the default stroke and fill color of circles, polygons and polylines; those defaults are now const Color(0xFF000000), the same value.
  • The plugin does not depend on material_ui, so apps can keep either flutter/material.dart or material_ui without type conflicts in the plugin's API. The public API and the minimum Flutter version (3.44) are unchanged.
  • The plugin's own tests use material_ui as a dev dependency (^1.0.1, which resolves on Flutter 3.44), migrated with dart fix --apply --code=migrate_design_widgets.
  • A new test pins the default colors as literals; it fails when a default changes.

Stacked on #793.

Checks run

  • Flutter 3.44.9: flutter analyze --fatal-infos lib test clean, 268 Dart tests pass.
  • Flutter 3.47.9: flutter analyze --fatal-infos lib test clean, 268 Dart tests pass.
  • Formatting with both versions: no changes.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation
  • I added new tests to check the change I am making
  • All existing and new tests are passing.

@jokerttu
jokerttu added this pull request to stack #788 November 4, 2026 14:17
@jokerttu jokerttu mentioned this pull request Nov 4, 2026
4 of 6 tasks
@jokerttu
jokerttu marked this pull request as ready for review November 5, 2026 07:19
@jokerttu
jokerttu force-pushed the plugin-widgets-import branch 2 times, most recently from 5686ff8 to 07ac927 Compare November 5, 2026 12:12
@jokerttu
jokerttu force-pushed the plugin-widgets-import branch from 07ac927 to d67829b Compare November 5, 2026 14:38
@jokerttu
jokerttu merged commit 084ed88 into main Nov 6, 2026
23 of 33 checks passed
@jokerttu
jokerttu deleted the plugin-widgets-import branch November 6, 2026 05:25
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