We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0750c0e commit 4474b31Copy full SHA for 4474b31
lib/src/helpers/utils.dart
@@ -1,5 +1,4 @@
1
-import 'dart:io';
2
-
+import 'package:flutter/foundation.dart';
3
import 'package:video_player/video_player.dart';
4
5
String formatDuration(Duration position) {
@@ -38,7 +37,7 @@ String formatDuration(Duration position) {
38
37
bool getIsBuffering(VideoPlayerController controller) {
39
final VideoPlayerValue value = controller.value;
40
41
- if (Platform.isAndroid) {
+ if (defaultTargetPlatform == TargetPlatform.android) {
42
if (value.isBuffering) {
43
// -> Check if we actually buffer, as android has a bug preventing to
44
// get the correct buffering state from this single bool.
0 commit comments