Skip to content

ci(flutter): ignore material.dart deprecation in beta - #3249

Merged
ditman merged 2 commits into
a2ui-project:mainfrom
ditman:fix/ignore-material-deprecation
Oct 16, 2026
Merged

ditman merged 2 commits into
a2ui-project:mainfrom
ditman:fix/ignore-material-deprecation

Conversation

@ditman

@ditman ditman commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Suppresses the deprecated_member_use analyzer warning on package:flutter/material.dart imports across dart/a2ui_flutter and samples/client/flutter/restaurant_finder/app.

Context

A recent Flutter beta channel update marks package:flutter/material.dart as deprecated (in preparation for the upcoming standalone package:material_ui migration). Because our Flutter CI workflow runs flutter analyze --fatal-infos against both stable and beta on main, the dart_a2ui_flutter (beta) and samples_client_flutter_restaurant_finder_app (beta) jobs are currently failing.

Since the replacement package is not yet available on stable, we cannot migrate the imports yet without breaking stable builds. Following the same approach taken in flutter/genui#1062, this PR adds an inline analyzer ignore comment pointing to the tracking issue (#3235) above each package:flutter/material.dart import so we can keep --fatal-infos enabled on both channels.

Changes

  • Added // ignore: deprecated_member_use, see https://github.com/a2ui-project/a2ui/issues/3235 above import 'package:flutter/material.dart'; in:
    • dart/a2ui_flutter (lib/ and test/ — 43 files)
    • samples/client/flutter/restaurant_finder/app (lib/ — 3 files)

Related to #3235.
Similar to flutter/genui#1058

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds '// ignore: deprecated_member_use' comments before importing 'package:flutter/material.dart' across numerous files in the 'a2ui_flutter' package and sample applications, referencing issue #3235. I have no feedback to provide as there are no review comments.

Comment thread dart/a2ui_flutter/lib/src/catalog/basic/audio_player.dart
@ditman
ditman force-pushed the fix/ignore-material-deprecation branch from 06f89f6 to e7751fa Compare October 16, 2026 01:09
@ditman

ditman commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

CI seems to not be running on "beta" on pull requests, so I updated my local copy of flutter to the latest master, and ran the analyze command:

$ flutter --version
Flutter 3.50.0-1.0.pre-78 • channel master • git@github.com:ditman/flutter-flutter.git
Framework • revision f7614d2898 (68 minutes ago) • 2026-10-16 00:10:16 +0000
Engine • hash 1fef39f7f7e0f3db1d0d09f761e6873b69fb9729 (revision dec795bfcc) (2 hours ago) • 2026-10-15 22:57:53.000Z
Tools • Dart 3.15.0 (build 3.15.0-34.0.dev) • DevTools 2.61.0

$ (cd dart/a2ui_flutter && flutter pub get && flutter analyze --fatal-infos) && (cd samples/client/flutter/restaurant_finder/app && flutter pub get && flutter analyze --fatal-infos)
Resolving dependencies in `/work/google/a2ui`...
Downloading packages...
  _fe_analyzer_shared 103.0.0 (109.0.0 available)
...
  yaml 3.1.3 (3.1.4 available)
Got dependencies in `/work/google/a2ui`!
41 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Analyzing a2ui_flutter...                                               
No issues found! (ran in 6.9s)

Resolving dependencies in `/work/google/a2ui`...
Downloading packages...
  _fe_analyzer_shared 103.0.0 (109.0.0 available)
...
  yaml 3.1.3 (3.1.4 available)
Got dependencies in `/work/google/a2ui`!
41 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Analyzing app...                                                        
No issues found! (ran in 6.2s)

(Seems like it'll work)

@ditman
ditman marked this pull request as ready for review October 16, 2026 01:21
@ditman
ditman enabled auto-merge (squash) October 16, 2026 01:21
@ditman

ditman commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

(Auto-merge enabled)

@andrewkolos andrewkolos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for taking the initiative here 👍

@ditman
ditman merged commit dcd17f9 into a2ui-project:main Oct 16, 2026
41 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in A2UI Oct 16, 2026
@ditman
ditman deleted the fix/ignore-material-deprecation branch October 16, 2026 01:42
@ditman

ditman commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for reviewing after hours @andrewkolos!

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