Skip to content

INTER-2915: fix: unbreak latest-stable Flutter CI in example app - #214

Merged
JuroUhlar merged 3 commits into
mainfrom
INTER-2915-fix-material-deprecation
Nov 17, 2026
Merged

JuroUhlar merged 3 commits into
mainfrom
INTER-2915-fix-material-deprecation

Conversation

@JuroUhlar

@JuroUhlar JuroUhlar commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Context

INTER-2915 | Failing run | material_ui on pub.dev | Flutter 3.50 Android minimums

Why

Latest stable Flutter (3.50) fails CI on the example app: flutter analyze flags the deprecated material.dart import, and Android builds reject the example's Gradle, AGP, and Kotlin plugin versions.

Things to note

  • Example-only changes. The published package is unchanged, so no changeset. The plugin's own android/settings.gradle (used only when opening the plugin by itself) still pins the old versions.
  • Not migrating to package:material_ui yet: every version needs Flutter >= 3.47, and our minimum is 3.44.0. On 3.44 the ignore matches nothing, which is harmless because unnecessary_ignore is off in flutter_lints 6.
  • Other PRs don't hit the Android errors because they skip the native build jobs when native files don't change.

Verification

  • CI runs analyze, test, and example builds on 3.44.0 and latest stable. The local SDK is a master build without the deprecation, so it couldn't reproduce the failures.

Change outline

Both example imports of material get a line-scoped ignore, in example/lib/main.dart and example/test/widget_test.dart:

+// ignore: deprecated_member_use
 import 'package:flutter/material.dart';

Example Android tooling raised to Flutter 3.50's hard minimums:

Tool From To File
Gradle 9.1.0 9.3.1 gradle-wrapper.properties
Android Gradle Plugin 9.0.1 9.1.1 settings.gradle
Kotlin Gradle Plugin 2.3.20 2.4.10 settings.gradle

Flutter 3.47 deprecates package:flutter/material.dart, which fails
`flutter analyze` on latest stable. The replacement, package:material_ui,
needs Flutter >= 3.47, above the 3.44 minimum, so ignore the lint on the
two example imports until the minimum is raised.

https://pub.dev/packages/material_ui

Refs: INTER-2915

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the example-only deprecation-warning suppressions.

No open issues 🎉

What changed in this PR

Suppresses the Flutter 3.47 material.dart deprecation warning in the example app while retaining Flutter 3.44 compatibility. The published SDK is unchanged.

Changes:

  • Adds line-scoped deprecated_member_use ignores to both example Material imports.
  • Documents why migration to package:material_ui is deferred, with a package link.
File Description
example/​test/​widget_test.dart Suppresses the Material import warning in widget tests and explains compatibility constraints.
example/​lib/​main.dart Suppresses the Material import warning in the example app and explains compatibility constraints.

Review effort: Balanced

Flutter 3.50 refuses to build Android apps with Gradle below 9.3.1, which
fails the latest-stable Android example builds.

Refs: INTER-2915
@JuroUhlar JuroUhlar changed the title INTER-2915: fix: silence material.dart deprecation in example app INTER-2915: fix: unbreak latest-stable Flutter CI in example app Nov 17, 2026
@JuroUhlar
JuroUhlar requested a balanced review from Copilot November 17, 2026 10:15

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the example-only Flutter compatibility update.

No open issues 🎉

Review effort: Balanced

Flutter 3.50 refuses to build Android apps with AGP below 9.1.1 or the
Kotlin Gradle plugin below 2.4.10.

Refs: INTER-2915
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR doesn't contain any changesets. If there are user-facing changes, don't forget to run:

pnpm exec changeset

to create a changeset.

Copilot AI 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.

🟢 Approval recommended

No active review issues were identified in the example app’s compatibility and Android tooling updates.

No open issues 🎉

Review effort: Balanced

@JuroUhlar
JuroUhlar merged commit 487de7e into main Nov 17, 2026
20 checks passed
@JuroUhlar
JuroUhlar deleted the INTER-2915-fix-material-deprecation branch November 17, 2026 14:42
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