Skip to content

Commit ad2e289

Browse files
authored
Merge pull request #923 from diegotori/flutter_3.29_minimum
Flutter 3.29 minimum version
2 parents 4340bc1 + e176704 commit ad2e289

21 files changed

+436
-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/*

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(
@@ -409,14 +406,16 @@ class ChewieController extends ChangeNotifier {
409406
allowPlaybackSpeedChanging ?? this.allowPlaybackSpeedChanging,
410407
useRootNavigator: useRootNavigator ?? this.useRootNavigator,
411408
playbackSpeeds: playbackSpeeds ?? this.playbackSpeeds,
412-
systemOverlaysOnEnterFullScreen: systemOverlaysOnEnterFullScreen ??
409+
systemOverlaysOnEnterFullScreen:
410+
systemOverlaysOnEnterFullScreen ??
413411
this.systemOverlaysOnEnterFullScreen,
414412
deviceOrientationsOnEnterFullScreen:
415413
deviceOrientationsOnEnterFullScreen ??
416-
this.deviceOrientationsOnEnterFullScreen,
414+
this.deviceOrientationsOnEnterFullScreen,
417415
systemOverlaysAfterFullScreen:
418416
systemOverlaysAfterFullScreen ?? this.systemOverlaysAfterFullScreen,
419-
deviceOrientationsAfterFullScreen: deviceOrientationsAfterFullScreen ??
417+
deviceOrientationsAfterFullScreen:
418+
deviceOrientationsAfterFullScreen ??
420419
this.deviceOrientationsAfterFullScreen,
421420
routePageBuilder: routePageBuilder ?? this.routePageBuilder,
422421
hideControlsTimer: hideControlsTimer ?? this.hideControlsTimer,
@@ -449,7 +448,8 @@ class ChewieController extends ChangeNotifier {
449448
final Future<void> Function(
450449
BuildContext context,
451450
List<OptionItem> chewieOptions,
452-
)? optionsBuilder;
451+
)?
452+
optionsBuilder;
453453

454454
/// Add your own additional options on top of chewie options
455455
final List<OptionItem> Function(BuildContext context)? additionalOptions;
@@ -506,7 +506,7 @@ class ChewieController extends ChangeNotifier {
506506
/// When the video playback runs into an error, you can build a custom
507507
/// error message.
508508
final Widget Function(BuildContext context, String errorMessage)?
509-
errorBuilder;
509+
errorBuilder;
510510

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