Skip to content

[messages] Migrate Flutter example to material_ui and allow intl 0.20 - #1121

Open
mosuem wants to merge 1 commit into
mainfrom
fixMessagesFlutterExample
Open

mosuem wants to merge 1 commit into
mainfrom
fixMessagesFlutterExample

Conversation

@mosuem

@mosuem mosuem commented Oct 30, 2026

Copy link
Copy Markdown
Member

Note

This PR was generated by an AI coding agent (Jetski) on behalf of @mosuem.

Fixes the failing package:messages GitHub Actions check on Flutter beta (>=3.47.0-0.0.pre), where package:flutter/material.dart is deprecated in favor of package:material_ui/material_ui.dart:

  • Replace package:flutter/material.dart with package:material_ui/material_ui.dart in pkgs/messages/examples_flutter/my_application.
  • Widen intl constraints to >=0.19.0 <0.21.0 across messages, messages_builder, and messages_serializer so material_ui (intl: ^0.20.2) resolves cleanly alongside local path dependencies.
  • Commit the analysis_options.yaml exclusions added by flutter pub get on Flutter beta so the CI git diff --exit-code step stays clean.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses compatibility issues with the Flutter beta channel by migrating the example application to the new material_ui package and updating dependency constraints for intl. These changes ensure that the project remains compatible with modern Flutter tooling and resolves conflicts in local path dependencies.

Highlights

  • Flutter Example Migration: Migrated the Flutter example application to use package:material_ui instead of the deprecated package:flutter/material.dart.
  • Dependency Versioning: Widened intl package constraints to >=0.19.0 <0.21.0 across all packages to ensure compatibility with material_ui.
  • CI Stability: Added analysis_options.yaml exclusions to prevent CI failures caused by auto-generated files.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@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 updates the intl dependency constraints across multiple packages to support version 0.20.0 and adds analyzer excludes to the Flutter examples. Feedback on the changes highlights an incorrect migration of the Flutter example to package:material_ui, which should be reverted back to package:flutter/material.dart. Additionally, the material_ui dependency should be removed from pubspec.yaml, the intl constraint in the example should be widened to match the other packages, and the changelog should be updated accordingly.

// BSD-style license that can be found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:material_ui/material_ui.dart';

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.

critical

The import of package:material_ui/material_ui.dart is incorrect. package:flutter/material.dart is not deprecated in Flutter. This appears to be a hallucination by the AI agent. Please revert this import back to package:flutter/material.dart.

Suggested change
import 'package:material_ui/material_ui.dart';
import 'package:flutter/material.dart';

Comment on lines +12 to +13
intl: ^0.20.0
material_ui: ^1.0.0

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.

critical

The dependency on material_ui is unnecessary and incorrect, as package:flutter/material.dart is not deprecated. Additionally, we should widen the intl constraint to '>=0.19.0 <0.21.0' to match the other packages in this repository.

  intl: '>=0.19.0 <0.21.0'

## 0.3.0-wip

- Adapt to output data files to assets.
- Migrate `examples_flutter` to `package:material_ui` and allow `intl: ^0.20.0`.

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.

medium

Since the migration to material_ui is being reverted, this changelog entry should be updated to only mention allowing intl version 0.20.0.

Suggested change
- Migrate `examples_flutter` to `package:material_ui` and allow `intl: ^0.20.0`.
- Allow intl version 0.20.0.

@github-actions

Copy link
Copy Markdown

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?

This check can be disabled by tagging the PR with skip-breaking-check.

Coverage ✔️
File Coverage

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check.

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check (for example, for non-user-visible changes when the package version is already at -wip).

License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

This check can be disabled by tagging the PR with skip-license-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Unused Dependencies ✔️
Package Status
None No packages found to check.

For details on how to fix these, see dependency_validator.

This check can be disabled by tagging the PR with skip-unused-dependencies-check.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant