Skip to content

Guides agent away from deprecated material and cupertino libraries - #271

Open
chunhtai wants to merge 1 commit into
mainfrom
material_ui
Open

chunhtai wants to merge 1 commit into
mainfrom
material_ui

Conversation

@chunhtai

@chunhtai chunhtai commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

as title

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@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 various Flutter documentation, skill guides, and rule definitions to transition from legacy SDK imports (like package:flutter/material.dart) to standalone packages (material_ui and cupertino_ui). Feedback on the changes highlights a compile-time error in a code example within resources/flutter_skills.yaml where const is incorrectly applied to MaterialApp containing non-constant expressions, and provides a corrected code snippet.

Comment thread resources/flutter_skills.yaml Resolved

### 4. Configure the App Entry Point
Import the generated localizations and the `flutter_localizations` library in your `main.dart`. Inject the delegates and supported locales into your `MaterialApp` or `CupertinoApp`.
Import the generated localizations alongside `package:material_ui/material_ui.dart` (or `package:cupertino_ui/cupertino_ui.dart` for a `CupertinoApp`) in your `main.dart`. Pass `GlobalMaterialLocalizations.delegates` (which bundles the Material, Cupertino, and Widgets delegates) or `GlobalCupertinoLocalizations.delegates` into `localizationsDelegates` rather than importing Material or Cupertino delegates from `flutter_localizations`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@QuncCccccc can you help me check if changes to this skill sounds good to you

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.

1 participant