Forráskód Böngészése

video_player version to ">=0.4.0 <=0.4.1" (#14)

Support video_player version to "">=0.4.0 <0.5.0"
Karthik Ponnam 7 éve
szülő
commit
2d030e67c5

+ 1 - 1
README.md

@@ -23,7 +23,7 @@ dependencies:
 import 'package:chewie/chewie.dart';
 
 final playerWidget = new Chewie(
-  new VideoPlayerController(
+  new VideoPlayerController.network(
     'https://flutter.github.io/assets-for-api-docs/videos/butterfly.mp4'
   ),
   aspectRatio: 3 / 2,

+ 1 - 1
example/lib/main.dart

@@ -6,7 +6,7 @@ import 'package:video_player/video_player.dart';
 void main() {
   runApp(
     new ChewieDemo(
-      controller: new VideoPlayerController(
+      controller: new VideoPlayerController.network(
         'https://flutter.github.io/assets-for-api-docs/videos/butterfly.mp4',
       ),
     ),

+ 1 - 0
example/pubspec.yaml

@@ -9,6 +9,7 @@ dependencies:
 
   # The following adds the Cupertino Icons font to your application.
   # Use with the CupertinoIcons class for iOS style icons.
+
   cupertino_icons: ^0.1.0
 
 dev_dependencies:

+ 1 - 0
lib/src/chewie_player.dart

@@ -6,6 +6,7 @@ import 'package:chewie/src/player_with_controls.dart';
 import 'dart:async';
 import 'package:video_player/video_player.dart';
 
+
 /// A Video Player with Material and Cupertino skins.
 ///
 /// `video_player` is pretty low level. Chewie wraps it in a friendly skin to

+ 3 - 3
lib/src/cupertino_controls.dart

@@ -362,7 +362,7 @@ class _CupertinoControlsState extends State<CupertinoControls> {
     );
   }
 
-  _cancelAndRestartTimer() {
+  void _cancelAndRestartTimer() {
     _hideTimer?.cancel();
 
     setState(() {
@@ -394,7 +394,7 @@ class _CupertinoControlsState extends State<CupertinoControls> {
     setState(() {
       _hideStuff = true;
 
-      widget.onExpandCollapse().then((_) {
+      widget.onExpandCollapse().then((dynamic _) {
         new Timer(new Duration(milliseconds: 300), () {
           if (!_disposed) {
             setState(() {
@@ -450,7 +450,7 @@ class _CupertinoControlsState extends State<CupertinoControls> {
     );
   }
 
-  _playPause() {
+  void _playPause() {
     setState(() {
       if (widget.controller.value.isPlaying) {
         _hideStuff = false;

+ 2 - 2
lib/src/material_controls.dart

@@ -227,7 +227,7 @@ class _MaterialControlsState extends State<MaterialControls> {
     );
   }
 
-  _cancelAndRestartTimer() {
+  void _cancelAndRestartTimer() {
     _hideTimer?.cancel();
 
     setState(() {
@@ -259,7 +259,7 @@ class _MaterialControlsState extends State<MaterialControls> {
     setState(() {
       _hideStuff = true;
 
-      widget.onExpandCollapse().then((_) {
+      widget.onExpandCollapse().then((dynamic _) {
         new Timer(new Duration(milliseconds: 300), () {
           if (!_disposed) {
             setState(() {

+ 1 - 1
pubspec.yaml

@@ -7,7 +7,7 @@ author: Brian Egan <brian@brianegan.com>
 dependencies:
   open_iconic_flutter: ">=0.2.0 <0.3.0"
   connectivity: ">=0.1.1 <0.2.0"
-  video_player: ">=0.2.0 <0.3.0"
+  video_player: ">=0.4.0 <=0.5.0"
   flutter:
     sdk: flutter