Skip to content

chore: update compatibility with Flutter 3.47.1 - #1353

Open
RmanAkbarzadeh wants to merge 3 commits into
bdlukaa:masterfrom
RmanAkbarzadeh:master
Open

chore: update compatibility with Flutter 3.47.1#1353
RmanAkbarzadeh wants to merge 3 commits into
bdlukaa:masterfrom
RmanAkbarzadeh:master

Conversation

@RmanAkbarzadeh

@RmanAkbarzadeh RmanAkbarzadeh commented Sep 2, 2026

Copy link
Copy Markdown

Description

This PR updates the package for Flutter 3.47.1 and migrates the existing Material and Cupertino UI code to the new standalone material_ui and cupertino_ui packages.

Changes

  • Updated Flutter compatibility to 3.47.1
  • Migrated package:flutter/material.dart to package:material_ui/material_ui.dart
  • Migrated package:flutter/cupertino.dart to package:cupertino_ui/cupertino_ui.dart
  • Updated affected imports to work with the standalone UI packages
  • Updated localization handling to use GlobalMaterialLocalizations.delegates, which provides the required Material, Cupertino, and Widgets localization delegates through the new standalone package structure

Validation

  • dart analyzepassed
  • flutter test274 tests passed

Notes

This is a compatibility and migration update. No intentional changes have been made to the package's existing behavior or functionality.

Pre-launch Checklist

  • I have updated CHANGELOG.md with my changes
  • I have run "dart format ." on the project
  • I have added/updated relevant documentation

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

It introduces at least one concrete type-safety bug (math.max(0, double) assigned to double) and also leaves dependency/versioning updates in a state that can cause non-reproducible or inconsistent releases.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates fluent_ui for Flutter 3.47.1 by migrating legacy flutter/material.dart and flutter/cupertino.dart usages to the new standalone material_ui and cupertino_ui packages, and adjusts localization delegate wiring to the new structure.

Changes:

  • Migrated Material/Cupertino imports (including tests and example) to material_ui / cupertino_ui.
  • Updated localization delegate plumbing to rely on GlobalMaterialLocalizations.delegates.
  • Minor refactors/cleanups in a few widget/test implementations.
File summaries
File Description
test/navigation_view_test.dart Switches test import from flutter/material.dart to material_ui.
test/menu_bar_test.dart Minor test cleanups (const inference, loop variable), aligns with updated APIs.
test/app_test.dart Switches test import from flutter/material.dart to material_ui.
pubspec.yaml Removes flutter_localizations SDK dep; adds material_ui/cupertino_ui.
lib/src/fluent_app.dart Migrates imports and updates delegate yielding to GlobalMaterialLocalizations.delegates.
lib/src/controls/surfaces/info_bar.dart Migrates Icons import to material_ui.
lib/src/controls/surfaces/acrylic.dart Migrates Material import alias from Flutter to material_ui.
lib/src/controls/pickers/color_picker/color_picker.dart Rewrites ternary into if element for list construction (format/style).
lib/src/controls/navigation/tab_view/tab_view.dart Replaces flutter_localizations usage with material_ui delegates; minor if refactors.
lib/src/controls/inputs/slider.dart Migrates Material import alias from Flutter to material_ui.
lib/src/controls/form/combo_box.dart Small numeric expression tweak (but currently introduces a type issue).
lib/src/controls/flyouts/tooltip.dart Removes a null-assertion on typography body style.
lib/l10n/generated/fluent_localizations.dart Switches localization imports and delegates to GlobalMaterialLocalizations.delegates.
lib/fluent_ui.dart Replaces exported Flutter Material symbols with material_ui equivalents; reorders exports.
example/pubspec.yaml Adds material_ui/cupertino_ui deps for the example app.
example/lib/widgets/material_equivalents.dart Migrates imports to material_ui / cupertino_ui.
example/lib/widgets/deferred_widget.dart Migrates flutter/material.dart import to material_ui.
CHANGELOG.md Adds a new 4.17.0 entry describing the migration/compat update.
Review details

Suppressed comments (1)

lib/src/controls/form/combo_box.dart:408

  • Same issue as above: math.max(0, ...) returns num, but the variable is declared double. Use 0.0 so the result is a double.
    final selectedItemOffset = getSelectedItemOffset();
    final double maxTopOffset = math.max(0, size.height - scaledItemHeight);
    final minBottomOffset = math.min(scaledItemHeight, size.height);
  • Files reviewed: 17/18 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/src/controls/form/combo_box.dart
Comment thread example/pubspec.yaml Outdated
Comment thread pubspec.yaml Outdated
Comment thread CHANGELOG.md
@RmanAkbarzadeh

Copy link
Copy Markdown
Author

Fixed the issues identified by Copilot's code analysis and verified the changes with flutter analyze and flutter test.

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