Skip to content

Commit 9738157

Browse files
committed
Merge remote-tracking branch 'master/master'
# Conflicts: # lib/src/player_with_controls.dart
2 parents 67de9c8 + 1369e9d commit 9738157

22 files changed

+439
-606
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ jobs:
3131
# refer to https://docs.flutter.dev/development/tools/sdk/releases.
3232
# Note: The version below should be manually updated to the latest second most recent version
3333
# after a new stable version comes out.
34-
- "3.27.4"
34+
- "3.29.3"
3535
- "3.x"
36+
fail-fast: false
3637
steps:
3738
- name: 📚 Git Checkout
3839
uses: actions/checkout@v4
@@ -59,3 +60,5 @@ jobs:
5960

6061
- name: 📁 Upload coverage to Codecov
6162
uses: codecov/codecov-action@v5
63+
# TODO: Remove the below once we have adequate tests for this library.
64+
continue-on-error: true

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,6 @@ build/
4545

4646
.project
4747
.classpath
48-
.settings
48+
.settings
49+
50+
coverage/*

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [1.12.0]
2+
* 🛠️ [#923](https://github.com/fluttercommunity/chewie/pull/923): Flutter 3.29 minimum version. Thanks [diegotori](https://github.com/diegotori).
3+
* **BREAKING CHANGE**: Library now requires at least Flutter version `3.29.0` or higher.
4+
15
## [1.11.3]
26
* 🛠️ [#917](https://github.com/fluttercommunity/chewie/pull/917): Resolve issue where 'subtitleOn' doesn't enable subtitles by default on iOS. Thanks [alideep5](https://github.com/alideep5).
37

example/lib/app/app.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import 'package:chewie/chewie.dart';
32
import 'package:chewie_example/app/theme.dart';
43
import 'package:flutter/material.dart';

lib/src/center_play_button.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ class CenterPlayButton extends StatelessWidget {
3838
child: IconButton(
3939
iconSize: 32,
4040
padding: const EdgeInsets.all(12.0),
41-
icon: isFinished
42-
? Icon(Icons.replay, color: iconColor)
43-
: AnimatedPlayPause(
44-
color: iconColor,
45-
playing: isPlaying,
46-
),
41+
icon:
42+
isFinished
43+
? Icon(Icons.replay, color: iconColor)
44+
: AnimatedPlayPause(
45+
color: iconColor,
46+
playing: isPlaying,
47+
),
4748
onPressed: onPressed,
4849
),
4950
),

lib/src/chewie_player.dart

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,20 @@ import 'package:provider/provider.dart';
1313
import 'package:video_player/video_player.dart';
1414
import 'package:wakelock_plus/wakelock_plus.dart';
1515

16-
typedef ChewieRoutePageBuilder = Widget Function(
17-
BuildContext context,
18-
Animation<double> animation,
19-
Animation<double> secondaryAnimation,
20-
ChewieControllerProvider controllerProvider,
21-
);
16+
typedef ChewieRoutePageBuilder =
17+
Widget Function(
18+
BuildContext context,
19+
Animation<double> animation,
20+
Animation<double> secondaryAnimation,
21+
ChewieControllerProvider controllerProvider,
22+
);
2223

2324
/// A Video Player with Material and Cupertino skins.
2425
///
2526
/// `video_player` is pretty low level. Chewie wraps it in a friendly skin to
2627
/// make it easy to use!
2728
class Chewie extends StatefulWidget {
28-
const Chewie({
29-
super.key,
30-
required this.controller,
31-
});
29+
const Chewie({super.key, required this.controller});
3230

3331
/// The [ChewieController]
3432
final ChewieController controller;
@@ -223,15 +221,13 @@ class ChewieState extends State<Chewie> {
223221
DeviceOrientation.landscapeRight,
224222
]);
225223
}
226-
227224
/// Video h > w means we force portrait
228225
else if (isPortraitVideo) {
229226
SystemChrome.setPreferredOrientations([
230227
DeviceOrientation.portraitUp,
231228
DeviceOrientation.portraitDown,
232229
]);
233230
}
234-
235231
/// Otherwise if h == w (square video)
236232
else {
237233
SystemChrome.setPreferredOrientations(DeviceOrientation.values);
@@ -310,9 +306,9 @@ class ChewieController extends ChangeNotifier {
310306
this.controlsSafeAreaMinimum = EdgeInsets.zero,
311307
this.pauseOnBackgroundTap = false,
312308
}) : assert(
313-
playbackSpeeds.every((speed) => speed > 0),
314-
'The playbackSpeeds values must all be greater than 0',
315-
) {
309+
playbackSpeeds.every((speed) => speed > 0),
310+
'The playbackSpeeds values must all be greater than 0',
311+
) {
316312
_initialize();
317313
}
318314

@@ -365,7 +361,8 @@ class ChewieController extends ChangeNotifier {
365361
Animation<double>,
366362
Animation<double>,
367363
ChewieControllerProvider,
368-
)? routePageBuilder,
364+
)?
365+
routePageBuilder,
369366
bool? pauseOnBackgroundTap,
370367
}) {
371368
return ChewieController(
@@ -415,14 +412,16 @@ class ChewieController extends ChangeNotifier {
415412
allowPlaybackSpeedChanging ?? this.allowPlaybackSpeedChanging,
416413
useRootNavigator: useRootNavigator ?? this.useRootNavigator,
417414
playbackSpeeds: playbackSpeeds ?? this.playbackSpeeds,
418-
systemOverlaysOnEnterFullScreen: systemOverlaysOnEnterFullScreen ??
415+
systemOverlaysOnEnterFullScreen:
416+
systemOverlaysOnEnterFullScreen ??
419417
this.systemOverlaysOnEnterFullScreen,
420418
deviceOrientationsOnEnterFullScreen:
421419
deviceOrientationsOnEnterFullScreen ??
422-
this.deviceOrientationsOnEnterFullScreen,
420+
this.deviceOrientationsOnEnterFullScreen,
423421
systemOverlaysAfterFullScreen:
424422
systemOverlaysAfterFullScreen ?? this.systemOverlaysAfterFullScreen,
425-
deviceOrientationsAfterFullScreen: deviceOrientationsAfterFullScreen ??
423+
deviceOrientationsAfterFullScreen:
424+
deviceOrientationsAfterFullScreen ??
426425
this.deviceOrientationsAfterFullScreen,
427426
routePageBuilder: routePageBuilder ?? this.routePageBuilder,
428427
hideControlsTimer: hideControlsTimer ?? this.hideControlsTimer,
@@ -455,7 +454,8 @@ class ChewieController extends ChangeNotifier {
455454
final Future<void> Function(
456455
BuildContext context,
457456
List<OptionItem> chewieOptions,
458-
)? optionsBuilder;
457+
)?
458+
optionsBuilder;
459459

460460
/// Add your own additional options on top of chewie options
461461
final List<OptionItem> Function(BuildContext context)? additionalOptions;
@@ -516,7 +516,7 @@ class ChewieController extends ChangeNotifier {
516516
/// When the video playback runs into an error, you can build a custom
517517
/// error message.
518518
final Widget Function(BuildContext context, String errorMessage)?
519-
errorBuilder;
519+
errorBuilder;
520520

521521
/// When the video is buffering, you can build a custom widget.
522522
final WidgetBuilder? bufferingBuilder;

lib/src/chewie_progress_colors.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ class ChewieProgressColors {
66
Color bufferedColor = const Color.fromRGBO(30, 30, 200, 0.2),
77
Color handleColor = const Color.fromRGBO(200, 200, 200, 1.0),
88
Color backgroundColor = const Color.fromRGBO(200, 200, 200, 0.5),
9-
}) : playedPaint = Paint()..color = playedColor,
10-
bufferedPaint = Paint()..color = bufferedColor,
11-
handlePaint = Paint()..color = handleColor,
12-
backgroundPaint = Paint()..color = backgroundColor;
9+
}) : playedPaint = Paint()..color = playedColor,
10+
bufferedPaint = Paint()..color = bufferedColor,
11+
handlePaint = Paint()..color = handleColor,
12+
backgroundPaint = Paint()..color = backgroundColor;
1313

1414
final Paint playedPaint;
1515
final Paint bufferedPaint;

0 commit comments

Comments
 (0)