Skip to content

analyze-flutter fails on main and every PR: the unpinned Flutter SDK deprecated package:flutter/material.dart #905

Closed

Description

@yashksaini-coder

analyze-flutter fails on main and on every PR whose CI has run since some point
between 2026-11-11 and today. Nothing in the repo changed to cause it.

Both findings are the same rule:

info • 'package:flutter/material.dart' is deprecated and shouldn't be used.
       Use package:material_ui/material_ui.dart instead. This feature was
       deprecated after v3.47.0-0.0.pre • deprecated_member_use
  mobile/agentmesh-node-app/lib/main.dart:8:1
  mobile/agentmesh-node-app/lib/scan_page.dart:1:1

2 issues found. (ran in 4.1s)
##[error]Process completed with exit code 1

Both are info, and flutter analyze still exits 1, so a deprecation in the SDK is a
hard CI failure.

It is the SDK moving, not the code

.github/workflows/test_flutter.yaml SHA-pins every action —
actions/checkout@3d3c42e5, subosito/flutter-action@1a449444,
ReactiveCircus/android-emulator-runner@a421e438 — and then asks for the SDK by channel,
in both analyze-flutter (line 54) and e2e-android (line 74):

- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2
  with:
    channel: 'stable'
    cache: true

No flutter-version, so the resolved SDK moves with no commit behind it. pubspec.yaml
constrains the Dart SDK (sdk: '>=3.0.0 <4.0.0') but nothing constrains Flutter.

Which runs are affected

analyze-flutter
main 2026-11-16 (two runs) failure
main 2026-11-11 3d015376 success
PRs #902, #903, #904 (ran today) failure
PRs #890, #891, #897 (ran earlier) success

The passing ones are older runs, not healthier branches — any PR re-run now goes red.

Candidate fixes

  1. Pin flutter-version in both jobs. Makes the build reproducible and stops the SDK
    moving on its own; the actions are already pinned this way. Worth doing on its own
    merit even if (2) is the real answer, because right now a cold cache and a warm cache
    can analyze against different SDKs.
  2. Migrate the two imports to package:material_ui/material_ui.dart. The actual fix,
    but it may need a pubspec.yaml dependency and a look at whether the new package is a
    drop-in for what main.dart and scan_page.dart use.
  3. flutter analyze --no-fatal-infos would go green immediately, but it would also hide
    every future info-level finding, so I would not suggest it over (1).

I do not have a Flutter toolchain here, so I am not going to send a patch I have not run,
and subosito/flutter-action does not echo the SDK version it resolved, so I could not
recover the exact version the 2026-11-11 run was green on. If someone with Flutter set up
confirms the version to pin, or that the material_ui import is a drop-in, I am happy to
do the PR and the verification around it.

@aojea you have the most recent commits under mobile/agentmesh-node-app — is this one
you would rather pin or migrate?

Activity

  1. aojea commented on Nov 16, 2026

    @aojea
    Collaborator

    I'm sending a PR right now to fix it

  2. aojea commented on Nov 16, 2026

    @aojea
    Collaborator

    fixed by #906

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions