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/cupertino_ui/lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,6 @@ class CupertinoApp extends StatefulWidget {
this.actions,
this.restorationScopeId,
this.scrollBehavior,
@Deprecated(
'Remove this parameter as it is now ignored. '
'CupertinoApp 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,
}) : routeInformationProvider = null,
routeInformationParser = null,
routerDelegate = null,
Expand Down Expand Up @@ -242,12 +236,6 @@ class CupertinoApp extends StatefulWidget {
this.actions,
this.restorationScopeId,
this.scrollBehavior,
@Deprecated(
'Remove this parameter as it is now ignored. '
'CupertinoApp 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,
}) : assert(routerDelegate != null || routerConfig != null),
navigatorObservers = null,
navigatorKey = null,
Expand Down Expand Up @@ -462,14 +450,6 @@ class CupertinoApp extends StatefulWidget {
/// in a subtree.
final ScrollBehavior? scrollBehavior;

/// {@macro flutter.widgets.widgetsApp.useInheritedMediaQuery}
@Deprecated(
'This setting is now ignored. '
'CupertinoApp 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;

@override
State<CupertinoApp> createState() => _CupertinoAppState();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
changelog: |
- Remove deprecated `useInheritedMediaQuery` flag in CupertinoApp
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) and field from CupertinoApp is a breaking change, as any existing code referencing or passing this parameter will fail to compile. According to semantic versioning, breaking changes require a major version bump rather than a minor one.

version: major
References
  1. Code changes must follow the version and CHANGELOG instructions, using semantic versioning (SemVer). Removing a deprecated public API parameter is a breaking change and requires a major version bump. (link)

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.

you might be right but this is the wrong like so i can't be sure, let's wait for a review

23 changes: 0 additions & 23 deletions packages/cupertino_ui/test/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -456,29 +456,6 @@ void main() {
);
});

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: CupertinoApp(
useInheritedMediaQuery: true,
builder: (BuildContext context, Widget? child) {
capturedContext = context;
return const Placeholder();
},
color: const Color(0xFF123456),
),
),
);
expect(capturedContext.dependOnInheritedWidgetOfExactType<MediaQuery>()?.key, uniqueKey);
},
);

testWidgets('CupertinoApp uses the dark SystemUIOverlayStyle when the background is light', (
WidgetTester tester,
) async {
Expand Down
Loading