Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# refer to https://docs.flutter.dev/development/tools/sdk/releases.
# Note: The version below should be manually updated to the latest second most recent version
# after a new stable version comes out.
- "3.24.5"
- "3.27.4"
- "3.x"
steps:
- name: 📚 Git Checkout
Expand Down
37 changes: 15 additions & 22 deletions example/lib/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

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

final String title;

Expand Down Expand Up @@ -47,13 +44,15 @@ class _ChewieDemoState extends State<ChewieDemo> {
];

Future<void> initializePlayer() async {
_videoPlayerController1 =
VideoPlayerController.networkUrl(Uri.parse(srcs[currPlayIndex]));
_videoPlayerController2 =
VideoPlayerController.networkUrl(Uri.parse(srcs[currPlayIndex]));
_videoPlayerController1 = VideoPlayerController.networkUrl(
Uri.parse(srcs[currPlayIndex]),
);
_videoPlayerController2 = VideoPlayerController.networkUrl(
Uri.parse(srcs[currPlayIndex]),
);
await Future.wait([
_videoPlayerController1.initialize(),
_videoPlayerController2.initialize()
_videoPlayerController2.initialize(),
]);
_createChewieController();
setState(() {});
Expand Down Expand Up @@ -93,7 +92,7 @@ class _ChewieDemoState extends State<ChewieDemo> {
TextSpan(
text: 'subtitles',
style: TextStyle(color: Colors.blue, fontSize: 18),
)
),
],
),
),
Expand Down Expand Up @@ -130,9 +129,7 @@ class _ChewieDemoState extends State<ChewieDemo> {
subtitleBuilder: (context, dynamic subtitle) => Container(
padding: const EdgeInsets.all(10.0),
child: subtitle is InlineSpan
? RichText(
text: subtitle,
)
? RichText(text: subtitle)
: Text(
subtitle.toString(),
style: const TextStyle(color: Colors.black),
Expand Down Expand Up @@ -176,19 +173,15 @@ class _ChewieDemoState extends State<ChewieDemo> {
platform: _platform ?? Theme.of(context).platform,
),
home: Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
appBar: AppBar(title: Text(widget.title)),
body: Column(
children: <Widget>[
Expanded(
child: Center(
child: _chewieController != null &&
_chewieController!
.videoPlayerController.value.isInitialized
? Chewie(
controller: _chewieController!,
)
? Chewie(controller: _chewieController!)
: const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expand Down Expand Up @@ -261,7 +254,7 @@ class _ChewieDemoState extends State<ChewieDemo> {
child: Text("Portrait Video"),
),
),
)
),
],
),
Row(
Expand Down Expand Up @@ -291,7 +284,7 @@ class _ChewieDemoState extends State<ChewieDemo> {
child: Text("iOS controls"),
),
),
)
),
],
),
Row(
Expand Down Expand Up @@ -324,7 +317,7 @@ class _ChewieDemoState extends State<ChewieDemo> {
}
},
),
)
),
],
),
),
Expand Down
4 changes: 1 addition & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ import 'package:chewie_example/app/app.dart';
import 'package:flutter/material.dart';

void main() {
runApp(
const ChewieDemo(),
);
runApp(const ChewieDemo());
}
8 changes: 4 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ version: 1.0.0
publish_to: none

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

dependencies:
chewie:
path: ../
flutter:
sdk: flutter
video_player: ^2.9.3

video_player: ^2.9.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^4.0.0
flutter_lints: ^5.0.0

# 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/chewie.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
library chewie;
library;

export 'src/chewie_player.dart';
export 'src/chewie_progress_colors.dart';
export 'src/cupertino/cupertino_controls.dart';
export 'src/material/material_controls.dart';
export 'src/material/material_progress_bar.dart';
export 'src/material/material_desktop_controls.dart';
export 'src/material/material_progress_bar.dart';
export 'src/models/index.dart';
12 changes: 6 additions & 6 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ version: 1.10.0
homepage: https://github.com/fluttercommunity/chewie

environment:
sdk: '>=3.5.0 <4.0.0'
flutter: ">=3.24.0"
sdk: '>=3.6.0 <4.0.0'
flutter: ">=3.27.0"

dependencies:
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.8
flutter:
sdk: flutter
provider: ^6.1.2
video_player: ^2.9.1
wakelock_plus: ^1.2.8
video_player: ^2.9.3
wakelock_plus: ^1.2.10

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^4.0.0
flutter_lints: ^5.0.0

flutter:
uses-material-design: true