Skip to content

Commit 85788bf

Browse files
committed
Merge commit '1369e9de5480063239626ddd11752b32230ee8e9' into custom-lg
* commit '1369e9de5480063239626ddd11752b32230ee8e9': chewie, version 1.12.0. Fixes issue fluttercommunity#923. Added more fixes to the Github workflow. Added more fixes related to supporting Flutter 3.29. Raised the minimum supported Flutter version to 3.29. # Conflicts: # .gitignore # lib/src/player_with_controls.dart
2 parents cc94f78 + 1369e9d commit 85788bf

22 files changed

+413
-581
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
@@ -48,4 +48,6 @@ build/
4848
.settings
4949

5050
# FVM Version Cache
51-
.fvm/
51+
.fvm/
52+
53+
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;
@@ -237,15 +235,13 @@ class ChewieState extends State<Chewie> {
237235
DeviceOrientation.landscapeRight,
238236
]);
239237
}
240-
241238
/// Video h > w means we force portrait
242239
else if (isPortraitVideo) {
243240
SystemChrome.setPreferredOrientations([
244241
DeviceOrientation.portraitUp,
245242
DeviceOrientation.portraitDown,
246243
]);
247244
}
248-
249245
/// Otherwise if h == w (square video)
250246
else {
251247
SystemChrome.setPreferredOrientations(DeviceOrientation.values);
@@ -324,9 +320,9 @@ class ChewieController extends ChangeNotifier {
324320
this.controlsSafeAreaMinimum = EdgeInsets.zero,
325321
this.pauseOnBackgroundTap = false,
326322
}) : assert(
327-
playbackSpeeds.every((speed) => speed > 0),
328-
'The playbackSpeeds values must all be greater than 0',
329-
) {
323+
playbackSpeeds.every((speed) => speed > 0),
324+
'The playbackSpeeds values must all be greater than 0',
325+
) {
330326
_initialize();
331327
}
332328

@@ -379,7 +375,8 @@ class ChewieController extends ChangeNotifier {
379375
Animation<double>,
380376
Animation<double>,
381377
ChewieControllerProvider,
382-
)? routePageBuilder,
378+
)?
379+
routePageBuilder,
383380
bool? pauseOnBackgroundTap,
384381
}) {
385382
return ChewieController(
@@ -423,14 +420,16 @@ class ChewieController extends ChangeNotifier {
423420
allowPlaybackSpeedChanging ?? this.allowPlaybackSpeedChanging,
424421
useRootNavigator: useRootNavigator ?? this.useRootNavigator,
425422
playbackSpeeds: playbackSpeeds ?? this.playbackSpeeds,
426-
systemOverlaysOnEnterFullScreen: systemOverlaysOnEnterFullScreen ??
423+
systemOverlaysOnEnterFullScreen:
424+
systemOverlaysOnEnterFullScreen ??
427425
this.systemOverlaysOnEnterFullScreen,
428426
deviceOrientationsOnEnterFullScreen:
429427
deviceOrientationsOnEnterFullScreen ??
430-
this.deviceOrientationsOnEnterFullScreen,
428+
this.deviceOrientationsOnEnterFullScreen,
431429
systemOverlaysAfterFullScreen:
432430
systemOverlaysAfterFullScreen ?? this.systemOverlaysAfterFullScreen,
433-
deviceOrientationsAfterFullScreen: deviceOrientationsAfterFullScreen ??
431+
deviceOrientationsAfterFullScreen:
432+
deviceOrientationsAfterFullScreen ??
434433
this.deviceOrientationsAfterFullScreen,
435434
routePageBuilder: routePageBuilder ?? this.routePageBuilder,
436435
hideControlsTimer: hideControlsTimer ?? this.hideControlsTimer,
@@ -463,7 +462,8 @@ class ChewieController extends ChangeNotifier {
463462
final Future<void> Function(
464463
BuildContext context,
465464
List<OptionItem> chewieOptions,
466-
)? optionsBuilder;
465+
)?
466+
optionsBuilder;
467467

468468
/// Add your own additional options on top of chewie options
469469
final List<OptionItem> Function(BuildContext context)? additionalOptions;
@@ -520,7 +520,7 @@ class ChewieController extends ChangeNotifier {
520520
/// When the video playback runs into an error, you can build a custom
521521
/// error message.
522522
final Widget Function(BuildContext context, String errorMessage)?
523-
errorBuilder;
523+
errorBuilder;
524524

525525
/// When the video is buffering, you can build a custom widget.
526526
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)