Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter 3.19 enforcement #824

Merged
Merged
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
8 changes: 3 additions & 5 deletions example/lib/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import 'dart:io';
import 'package:chewie/chewie.dart';
import 'package:chewie_example/app/theme.dart';
import 'package:flutter/material.dart';
// ignore: depend_on_referenced_packages
import 'package:video_player/video_player.dart';

class ChewieDemo extends StatefulWidget {
const ChewieDemo({
Key? key,
super.key,
this.title = 'Chewie Demo',
}) : super(key: key);
});

final String title;

Expand Down Expand Up @@ -333,8 +332,7 @@ class _ChewieDemoState extends State<ChewieDemo> {
}

class DelaySlider extends StatefulWidget {
const DelaySlider({Key? key, required this.delay, required this.onSave})
: super(key: key);
const DelaySlider({super.key, required this.delay, required this.onSave});

final int? delay;
final void Function(int?) onSave;
Expand Down
7 changes: 4 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ version: 1.0.0
publish_to: none

environment:
sdk: '>=2.18.0 <4.0.0'
flutter: ">=3.10.0"
sdk: '>=3.3.0 <4.0.0'
flutter: ">=3.19.0"

dependencies:
chewie:
path: ../
flutter:
sdk: flutter

video_player: any
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.1
flutter_lints: ^3.0.2

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
Expand Down
4 changes: 2 additions & 2 deletions lib/src/animated_play_pause.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
/// A widget that animates implicitly between a play and a pause icon.
class AnimatedPlayPause extends StatefulWidget {
const AnimatedPlayPause({
Key? key,
super.key,
required this.playing,
this.size,
this.color,
}) : super(key: key);
});

final double? size;
final bool playing;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/center_play_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import 'package:flutter/material.dart';

class CenterPlayButton extends StatelessWidget {
const CenterPlayButton({
Key? key,
super.key,
required this.backgroundColor,
this.iconColor,
required this.show,
required this.isPlaying,
required this.isFinished,
this.onPressed,
}) : super(key: key);
});

final Color backgroundColor;
final Color? iconColor;
Expand Down
10 changes: 5 additions & 5 deletions lib/src/chewie_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ typedef ChewieRoutePageBuilder = Widget Function(
/// make it easy to use!
class Chewie extends StatefulWidget {
const Chewie({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});

/// The [ChewieController]
final ChewieController controller;
Expand Down Expand Up @@ -647,10 +647,10 @@ class ChewieController extends ChangeNotifier {

class ChewieControllerProvider extends InheritedWidget {
const ChewieControllerProvider({
Key? key,
super.key,
required this.controller,
required Widget child,
}) : super(key: key, child: child);
required super.child,
});

final ChewieController controller;

Expand Down
8 changes: 3 additions & 5 deletions lib/src/cupertino/cupertino_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class CupertinoControls extends StatefulWidget {
required this.backgroundColor,
required this.iconColor,
this.showPlayButton = true,
Key? key,
}) : super(key: key);
super.key,
});

final Color backgroundColor;
final Color iconColor;
Expand Down Expand Up @@ -822,12 +822,10 @@ class _CupertinoControlsState extends State<CupertinoControls>

class _PlaybackSpeedDialog extends StatelessWidget {
const _PlaybackSpeedDialog({
Key? key,
required List<double> speeds,
required double selected,
}) : _speeds = speeds,
_selected = selected,
super(key: key);
_selected = selected;

final List<double> _speeds;
final double _selected;
Expand Down
5 changes: 2 additions & 3 deletions lib/src/cupertino/cupertino_progress_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ class CupertinoVideoProgressBar extends StatelessWidget {
this.onDragEnd,
this.onDragStart,
this.onDragUpdate,
Key? key,
}) : colors = colors ?? ChewieProgressColors(),
super(key: key);
super.key,
}) : colors = colors ?? ChewieProgressColors();

final VideoPlayerController controller;
final ChewieProgressColors colors;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/cupertino/widgets/cupertino_options_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'package:flutter/cupertino.dart';

class CupertinoOptionsDialog extends StatefulWidget {
const CupertinoOptionsDialog({
Key? key,
super.key,
required this.options,
this.cancelButtonText,
}) : super(key: key);
});

final List<OptionItem> options;
final String? cancelButtonText;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/helpers/adaptive_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:flutter/material.dart';

class AdaptiveControls extends StatelessWidget {
const AdaptiveControls({
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/material/material_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import 'package:video_player/video_player.dart';
class MaterialControls extends StatefulWidget {
const MaterialControls({
this.showPlayButton = true,
Key? key,
}) : super(key: key);
super.key,
});

final bool showPlayButton;

Expand Down
4 changes: 2 additions & 2 deletions lib/src/material/material_desktop_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import 'package:video_player/video_player.dart';
class MaterialDesktopControls extends StatefulWidget {
const MaterialDesktopControls({
this.showPlayButton = true,
Key? key,
}) : super(key: key);
super.key,
});

final bool showPlayButton;

Expand Down
5 changes: 2 additions & 3 deletions lib/src/material/material_progress_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ class MaterialVideoProgressBar extends StatelessWidget {
this.onDragEnd,
this.onDragStart,
this.onDragUpdate,
Key? key,
}) : colors = colors ?? ChewieProgressColors(),
super(key: key);
super.key,
}) : colors = colors ?? ChewieProgressColors();

final double height;
final VideoPlayerController controller;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/material/widgets/options_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'package:flutter/material.dart';

class OptionsDialog extends StatefulWidget {
const OptionsDialog({
Key? key,
super.key,
required this.options,
this.cancelButtonText,
}) : super(key: key);
});

final List<OptionItem> options;
final String? cancelButtonText;
Expand Down
5 changes: 2 additions & 3 deletions lib/src/material/widgets/playback_speed_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import 'package:flutter/material.dart';

class PlaybackSpeedDialog extends StatelessWidget {
const PlaybackSpeedDialog({
Key? key,
super.key,
required List<double> speeds,
required double selected,
}) : _speeds = speeds,
_selected = selected,
super(key: key);
_selected = selected;

final List<double> _speeds;
final double _selected;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/player_with_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:provider/provider.dart';
import 'package:video_player/video_player.dart';

class PlayerWithControls extends StatelessWidget {
const PlayerWithControls({Key? key}) : super(key: key);
const PlayerWithControls({super.key});

@override
Widget build(BuildContext context) {
Expand Down
9 changes: 4 additions & 5 deletions lib/src/progress_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ class VideoProgressBar extends StatefulWidget {
this.onDragEnd,
this.onDragStart,
this.onDragUpdate,
Key? key,
super.key,
required this.barHeight,
required this.handleHeight,
required this.drawShadow,
}) : colors = colors ?? ChewieProgressColors(),
super(key: key);
}) : colors = colors ?? ChewieProgressColors();

final VideoPlayerController controller;
final ChewieProgressColors colors;
Expand Down Expand Up @@ -126,14 +125,14 @@ class _VideoProgressBarState extends State<VideoProgressBar> {

class StaticProgressBar extends StatelessWidget {
const StaticProgressBar({
Key? key,
super.key,
required this.value,
required this.colors,
required this.barHeight,
required this.handleHeight,
required this.drawShadow,
this.latestDraggableOffset,
}) : super(key: key);
});

final Offset? latestDraggableOffset;
final VideoPlayerValue value;
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: chewie
description: A video player for Flutter with Cupertino and Material play controls
version: 1.7.5
homepage: http://github.com/fluttercommunity/chewie
homepage: https://github.com/fluttercommunity/chewie

environment:
sdk: '>=2.18.0 <4.0.0'
flutter: ">=3.3.0"
sdk: '>=3.3.0 <4.0.0'
flutter: ">=3.19.0"

dependencies:
cupertino_icons: ^1.0.5
Expand All @@ -18,7 +18,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.2
flutter_lints: ^3.0.2

flutter:
uses-material-design: true
Loading