-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #828 from EmreDET/fix-is-finished-bug
Fix the logic of the Center Play Button icon selection
- Loading branch information
Showing
27 changed files
with
416 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
**/dgph | ||
*.mode1v3 | ||
*.mode2v3 | ||
*.moved-aside | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import UIKit | ||
import Flutter | ||
import UIKit | ||
|
||
@UIApplicationMain | ||
@objc class AppDelegate: FlutterAppDelegate { | ||
|
Binary file modified
BIN
-269 Bytes
(52%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-877 Bytes
(32%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.11 KB
(28%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-743 Bytes
(28%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.22 KB
(27%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.19 KB
(37%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-877 Bytes
(32%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.28 KB
(31%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.76 KB
(32%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.76 KB
(32%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.11 KB
(44%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.1 KB
(40%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.02 KB
(37%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.14 KB
(39%)
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Flutter | ||
import UIKit | ||
import XCTest | ||
|
||
class RunnerTests: XCTestCase { | ||
|
||
func testExample() { | ||
// If you add code to the Runner application, consider adding tests here. | ||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest. | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
import 'package:chewie/chewie.dart'; | ||
import 'package:chewie/src/center_play_button.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:video_player/video_player.dart'; | ||
|
||
List<String> srcs = [ | ||
"https://assets.mixkit.co/videos/preview/mixkit-spinning-around-the-earth-29351-large.mp4", | ||
"https://assets.mixkit.co/videos/preview/mixkit-daytime-city-traffic-aerial-view-56-large.mp4", | ||
"https://assets.mixkit.co/videos/preview/mixkit-a-girl-blowing-a-bubble-gum-at-an-amusement-park-1226-large.mp4" | ||
]; | ||
|
||
main() { | ||
testWidgets("MaterialControls state test", (WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
var videoPlayerController = VideoPlayerController.networkUrl( | ||
Uri.parse(srcs[0]), | ||
); | ||
var materialControlsKey = GlobalKey(); | ||
var chewieController = ChewieController( | ||
videoPlayerController: videoPlayerController, | ||
autoPlay: false, | ||
looping: false, | ||
customControls: MaterialControls( | ||
key: materialControlsKey, | ||
), | ||
); | ||
await tester.pumpWidget( | ||
MaterialApp( | ||
home: Scaffold( | ||
body: Chewie( | ||
controller: chewieController, | ||
), | ||
), | ||
), | ||
); | ||
|
||
await tester.pump(); | ||
|
||
var playButton = find.byType(CenterPlayButton); | ||
expect(playButton, findsOneWidget); | ||
var btn = playButton.first; | ||
var playButtonWidget = tester.widget<CenterPlayButton>(btn); | ||
expect(playButtonWidget.isFinished, false); | ||
}); | ||
|
||
testWidgets("CupertinoControls state test", (WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
var videoPlayerController = VideoPlayerController.networkUrl( | ||
Uri.parse(srcs[0]), | ||
); | ||
var materialControlsKey = GlobalKey(); | ||
var chewieController = ChewieController( | ||
videoPlayerController: videoPlayerController, | ||
autoPlay: false, | ||
looping: false, | ||
customControls: CupertinoControls( | ||
key: materialControlsKey, | ||
backgroundColor: Colors.black, | ||
iconColor: Colors.white, | ||
), | ||
); | ||
await tester.pumpWidget( | ||
MaterialApp( | ||
home: Scaffold( | ||
body: Chewie( | ||
controller: chewieController, | ||
), | ||
), | ||
), | ||
); | ||
|
||
await tester.pump(); | ||
|
||
var playButton = find.byType(CenterPlayButton); | ||
expect(playButton, findsOneWidget); | ||
var btn = playButton.first; | ||
var playButtonWidget = tester.widget<CenterPlayButton>(btn); | ||
expect(playButtonWidget.isFinished, false); | ||
}); | ||
|
||
testWidgets("MaterialDesktopControls state test", | ||
(WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
var videoPlayerController = VideoPlayerController.networkUrl( | ||
Uri.parse(srcs[0]), | ||
); | ||
var materialControlsKey = GlobalKey(); | ||
var chewieController = ChewieController( | ||
videoPlayerController: videoPlayerController, | ||
autoPlay: false, | ||
looping: false, | ||
customControls: MaterialDesktopControls( | ||
key: materialControlsKey, | ||
), | ||
); | ||
await tester.pumpWidget( | ||
MaterialApp( | ||
home: Scaffold( | ||
body: Chewie( | ||
controller: chewieController, | ||
), | ||
), | ||
), | ||
); | ||
|
||
await tester.pump(); | ||
|
||
var playButton = find.byType(CenterPlayButton); | ||
expect(playButton, findsOneWidget); | ||
var btn = playButton.first; | ||
var playButtonWidget = tester.widget<CenterPlayButton>(btn); | ||
expect(playButtonWidget.isFinished, false); | ||
}); | ||
} |