Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions packages/material_ui/lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,6 @@ class MaterialApp extends StatefulWidget {
this.actions,
this.restorationScopeId,
this.scrollBehavior,
@Deprecated(
'Remove this parameter as it is now ignored. '
'MaterialApp never introduces its own MediaQuery; the View widget takes care of that. '
'This feature was deprecated after v3.7.0-29.0.pre.',
)
this.useInheritedMediaQuery = false,
this.themeAnimationStyle,
}) : routeInformationProvider = null,
routeInformationParser = null,
Expand Down Expand Up @@ -328,12 +322,6 @@ class MaterialApp extends StatefulWidget {
this.actions,
this.restorationScopeId,
this.scrollBehavior,
@Deprecated(
'Remove this parameter as it is now ignored. '
'MaterialApp never introduces its own MediaQuery; the View widget takes care of that. '
'This feature was deprecated after v3.7.0-29.0.pre.',
)
this.useInheritedMediaQuery = false,
this.themeAnimationStyle,
}) : assert(routerDelegate != null || routerConfig != null),
navigatorObservers = null,
Expand Down Expand Up @@ -786,14 +774,6 @@ class MaterialApp extends StatefulWidget {
/// * <https://material.io/design/layout/spacing-methods.html>
final bool debugShowMaterialGrid;

/// {@macro flutter.widgets.widgetsApp.useInheritedMediaQuery}
@Deprecated(
'This setting is now ignored. '
'MaterialApp never introduces its own MediaQuery; the View widget takes care of that. '
'This feature was deprecated after v3.7.0-29.0.pre.',
)
final bool useInheritedMediaQuery;

/// Used to override the theme animation curve and duration.
///
/// If [AnimationStyle.duration] is provided, it will be used to override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
changelog: |
- Remove deprecated `useInheritedMediaQuery` flag in MaterialApp
version: minor

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

Removing a deprecated public parameter (useInheritedMediaQuery) is a breaking change. If the package version is 1.0.0 or higher, this requires a major version bump instead of minor according to semantic versioning. Please verify the current package version and update this to major if the package is already at or past 1.0.0.

version: major

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

23 changes: 0 additions & 23 deletions packages/material_ui/test/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1465,29 +1465,6 @@ void main() {
await tester.pumpAndSettle();
}, variant: TargetPlatformVariant.only(TargetPlatform.android));

testWidgets(
'When `useInheritedMediaQuery` is true an existing MediaQuery is used if one is available',
(WidgetTester tester) async {
late BuildContext capturedContext;
final uniqueKey = UniqueKey();
await tester.pumpWidget(
MediaQuery(
key: uniqueKey,
data: const MediaQueryData(),
child: MaterialApp(
useInheritedMediaQuery: true,
builder: (BuildContext context, Widget? child) {
capturedContext = context;
return const Placeholder();
},
color: const Color(0xFF123456),
),
),
);
expect(capturedContext.dependOnInheritedWidgetOfExactType<MediaQuery>()?.key, uniqueKey);
},
);

testWidgets('Assert in buildScrollbar that controller != null when using it (vertical)', (
WidgetTester tester,
) async {
Expand Down
1 change: 0 additions & 1 deletion packages/material_ui/test/bottom_app_bar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ void main() {
const MediaQuery(
data: MediaQueryData(padding: EdgeInsets.only(top: 128)),
child: MaterialApp(
useInheritedMediaQuery: true,
home: SafeArea(
child: Scaffold(
bottomNavigationBar: ShapeListener(
Expand Down
1 change: 0 additions & 1 deletion packages/material_ui/test/navigation_drawer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ void main() {
MediaQuery(
data: const MediaQueryData(padding: EdgeInsets.all(20.0)),
child: MaterialApp(
useInheritedMediaQuery: true,
home: Scaffold(
key: scaffoldKey,
drawer: NavigationDrawer(
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/test/tooltip_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ void main() {
);
return MediaQuery(
data: MediaQueryData(viewInsets: EdgeInsets.only(bottom: viewInsetsHeight)),
child: MaterialApp(useInheritedMediaQuery: true, home: scaffold),
child: MaterialApp(home: scaffold),
);
}

Expand Down
Loading