refactor: import widgets.dart instead of material.dart - #161
Merged
LinXunFeng merged 2 commits intoSep 14, 2026
Merged
LinXunFeng merged 2 commits into
LinXunFeng merged 2 commits into
Conversation
LinXunFeng
deleted the
LinXunFeng/feature-request-flutter-version-3.47-has-been-re
branch
September 14, 2026 17:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Description
Flutter 3.47 ships Material and Cupertino as the standalone
material_uiandcupertino_uipackages, and the in-frameworkpackage:flutter/material.dartis scheduled for deprecation.scrollview_observerdoesn't use any Material widgets.lib/only importedpackage:flutter/material.dartfor thewidgets,renderingandfoundationsymbols it re-exports. This PR replaces those imports withpackage:flutter/widgets.dartin all 27 files underlib/, so the package no longer depends on either design library.material_uidependency is added, so it works the same whether the app usespackage:flutter/material.dartorpackage:material_ui.material_ui.sdk: ">=2.19.0 <4.0.0",flutter: '>=3.7.0') stay unchanged, and there are no public API changes, so this ships as a patch release (1.27.3).[SliverAppBar]inObserverUtils.calcPersistentHeaderExtentbecomes`SliverAppBar`, since that symbol is no longer in scope and would otherwise produce an unresolved dartdoc reference.example/andtest/still importpackage:flutter/material.dart. They are not part of the published library and will be migrated separately.Tests
flutter test- 86 passed,flutter analyze .- no issues,dart format --set-exit-if-changed .- 0 changedflutter analyze lib- no issues,flutter test- 86 passedflutter analyze lib- no issues,sliver_observer_test.dartandobserver_utils_test.dartpassedmaterial_ui(migrated withdart fix --apply --code=migrate_design_widgets), and verifyListViewObserver+jumpToworks via a widget testpana- 160/160