Skip to content

Commit 789e3a7

Browse files
[various] Align Flutter and Dart SDK constraints (flutter#3349)
As described in flutter/flutter#121684, we currently have inconsistencies between Flutter SDK constraints and Dart SDK constraints; we have often updated only the former. This PR: 1. Adds CI enforcement via the repo tooling that the minimum versions are consistent. 2. Adds a new repo tooling command to update SDK constraints, to help mass-fix all the violations of the new enforcement in step 1 (and for future mass changes, such as when we update our test matrix and mass-drop support for versions that are no longe tested). - In all cases, the looser constraint was updated to match the more restrictive constraint, such that there's no actual change in what Flutter version any package actually supports. 3. Runs `dart fix --apply` over all changed packages to automatically fix all of the analysis failures caused by step 2 suddenly making all of our packages able to use `super` parameters. Fixes flutter/flutter#121684 Fixes flutter/flutter#121685
1 parent f14fae7 commit 789e3a7

496 files changed

Lines changed: 1363 additions & 838 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ task:
9595
always:
9696
format_script: ./script/tool_runner.sh format --fail-on-change
9797
license_script: $PLUGIN_TOOL_COMMAND license-check
98-
# The major and minor versions here should match the lowest version
98+
# The major and minor version here should match the lowest version
9999
# analyzed in legacy_version_analyze.
100-
pubspec_script: ./script/tool_runner.sh pubspec-check --min-min-flutter-version=3.0.0 --min-min-dart-version=2.17.0
100+
pubspec_script: ./script/tool_runner.sh pubspec-check --min-min-flutter-version=3.0.0
101101
readme_script:
102102
- ./script/tool_runner.sh readme-check
103103
# Re-run with --require-excerpts, skipping packages that still need

packages/animations/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Aligns Dart and Flutter SDK constraints.
4+
15
## 2.0.7
26
* Updates screenshots to use webp compressed animations
37

packages/animations/example/lib/container_transition.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const double _fabDimension = 56.0;
4141
/// The demo page for [OpenContainerTransform].
4242
class OpenContainerTransformDemo extends StatefulWidget {
4343
/// Creates the demo page for [OpenContainerTransform].
44-
const OpenContainerTransformDemo({Key? key}) : super(key: key);
44+
const OpenContainerTransformDemo({super.key});
4545

4646
@override
4747
State<OpenContainerTransformDemo> createState() {

packages/animations/example/lib/fade_scale_transition.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
88
/// The demo page for [FadeScaleTransition].
99
class FadeScaleTransitionDemo extends StatefulWidget {
1010
/// Creates the demo page for [FadeScaleTransition].
11-
const FadeScaleTransitionDemo({Key? key}) : super(key: key);
11+
const FadeScaleTransitionDemo({super.key});
1212

1313
@override
1414
State<FadeScaleTransitionDemo> createState() =>

packages/animations/example/lib/fade_through_transition.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
88
/// The demo page for [FadeThroughTransition].
99
class FadeThroughTransitionDemo extends StatefulWidget {
1010
/// Creates the demo page for [FadeThroughTransition].
11-
const FadeThroughTransitionDemo({Key? key}) : super(key: key);
11+
const FadeThroughTransitionDemo({super.key});
1212

1313
@override
1414
State<FadeThroughTransitionDemo> createState() =>

packages/animations/example/lib/shared_axis_transition.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
88
/// The demo page for [SharedAxisPageTransitionsBuilder].
99
class SharedAxisTransitionDemo extends StatefulWidget {
1010
/// Creates the demo page for [SharedAxisPageTransitionsBuilder].
11-
const SharedAxisTransitionDemo({Key? key}) : super(key: key);
11+
const SharedAxisTransitionDemo({super.key});
1212

1313
@override
1414
State<SharedAxisTransitionDemo> createState() {

packages/animations/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ publish_to: none
66
version: 0.0.1
77

88
environment:
9-
sdk: ">=2.12.0 <3.0.0"
9+
sdk: ">=2.17.0 <3.0.0"
1010
flutter: ">=3.0.0"
1111

1212
dependencies:

packages/animations/lib/src/fade_scale_transition.dart

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,12 @@ class FadeScaleTransitionConfiguration extends ModalConfiguration {
6565
/// a dismissible barrier. [barrierDismissible] cannot be null. If
6666
/// [barrierDismissible] is true, the [barrierLabel] cannot be null.
6767
const FadeScaleTransitionConfiguration({
68-
Color barrierColor = Colors.black54,
69-
bool barrierDismissible = true,
70-
Duration transitionDuration = const Duration(milliseconds: 150),
71-
Duration reverseTransitionDuration = const Duration(milliseconds: 75),
72-
String barrierLabel = 'Dismiss',
73-
}) : super(
74-
barrierColor: barrierColor,
75-
barrierDismissible: barrierDismissible,
76-
barrierLabel: barrierLabel,
77-
transitionDuration: transitionDuration,
78-
reverseTransitionDuration: reverseTransitionDuration,
79-
);
68+
super.barrierColor = Colors.black54,
69+
super.barrierDismissible = true,
70+
super.transitionDuration = const Duration(milliseconds: 150),
71+
super.reverseTransitionDuration = const Duration(milliseconds: 75),
72+
String super.barrierLabel = 'Dismiss',
73+
});
8074

8175
@override
8276
Widget transitionBuilder(
@@ -115,10 +109,10 @@ class FadeScaleTransition extends StatelessWidget {
115109
/// [animation] is typically an [AnimationController] that drives the transition
116110
/// animation. [animation] cannot be null.
117111
const FadeScaleTransition({
118-
Key? key,
112+
super.key,
119113
required this.animation,
120114
this.child,
121-
}) : super(key: key);
115+
});
122116

123117
/// The animation that drives the [child]'s entrance and exit.
124118
///

packages/animations/lib/src/fade_through_transition.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ class FadeThroughTransition extends StatelessWidget {
162162
/// The [animation] and [secondaryAnimation] argument are required and must
163163
/// not be null.
164164
const FadeThroughTransition({
165-
Key? key,
165+
super.key,
166166
required this.animation,
167167
required this.secondaryAnimation,
168168
this.fillColor,
169169
this.child,
170-
}) : super(key: key);
170+
});
171171

172172
/// The animation that drives the [child]'s entrance and exit.
173173
///
@@ -213,8 +213,7 @@ class FadeThroughTransition extends StatelessWidget {
213213
}
214214

215215
class _ZoomedFadeInFadeOut extends StatelessWidget {
216-
const _ZoomedFadeInFadeOut({Key? key, required this.animation, this.child})
217-
: super(key: key);
216+
const _ZoomedFadeInFadeOut({required this.animation, this.child});
218217

219218
final Animation<double> animation;
220219
final Widget? child;

packages/animations/lib/src/modal.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ class _ModalRoute<T> extends PopupRoute<T> {
9898
required _ModalTransitionBuilder transitionBuilder,
9999
required this.builder,
100100
RouteSettings? routeSettings,
101-
ui.ImageFilter? filter,
101+
super.filter,
102102
}) : assert(!barrierDismissible || barrierLabel != null),
103103
_transitionBuilder = transitionBuilder,
104-
super(filter: filter, settings: routeSettings);
104+
super(settings: routeSettings);
105105

106106
@override
107107
final Color? barrierColor;

0 commit comments

Comments
 (0)