Skip to content

Commit

Permalink
[various] Align Flutter and Dart SDK constraints (#3349)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stuartmorgan committed Mar 4, 2023
1 parent 573ba91 commit 9221a14
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## NEXT

* Aligns Dart and Flutter SDK constraints.

## 2.4.0

* Updates minimum Flutter version to 3.3 and iOS 11.
Expand Down
3 changes: 1 addition & 2 deletions example/lib/main.dart
Expand Up @@ -215,8 +215,7 @@ class _BumbleBeeEncryptedLiveStreamState
}

class _ControlsOverlay extends StatelessWidget {
const _ControlsOverlay({Key? key, required this.controller})
: super(key: key);
const _ControlsOverlay({required this.controller});

static const List<double> _examplePlaybackRates = <double>[
0.25,
Expand Down
4 changes: 2 additions & 2 deletions example/lib/mini_controller.dart
Expand Up @@ -346,7 +346,7 @@ class MiniController extends ValueNotifier<VideoPlayerValue> {
/// Widget that displays the video controlled by [controller].
class VideoPlayer extends StatefulWidget {
/// Uses the given [controller] for all video rendered in this widget.
const VideoPlayer(this.controller, {Key? key}) : super(key: key);
const VideoPlayer(this.controller, {super.key});

/// The [MiniController] responsible for the video being rendered in
/// this widget.
Expand Down Expand Up @@ -445,7 +445,7 @@ class _VideoScrubberState extends State<_VideoScrubber> {
class VideoProgressIndicator extends StatefulWidget {
/// Construct an instance that displays the play/buffering status of the video
/// controlled by [controller].
const VideoProgressIndicator(this.controller, {Key? key}) : super(key: key);
const VideoProgressIndicator(this.controller, {super.key});

/// The [MiniController] that actually associates a video with this
/// widget.
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Expand Up @@ -3,7 +3,7 @@ description: Demonstrates how to use the video_player plugin.
publish_to: none

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"

dependencies:
Expand Down

0 comments on commit 9221a14

Please sign in to comment.