Skip to content

Commit 4474b31

Browse files
committed
Removed usage of dart:io
1 parent 0750c0e commit 4474b31

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/src/helpers/utils.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import 'dart:io';
2-
1+
import 'package:flutter/foundation.dart';
32
import 'package:video_player/video_player.dart';
43

54
String formatDuration(Duration position) {
@@ -38,7 +37,7 @@ String formatDuration(Duration position) {
3837
bool getIsBuffering(VideoPlayerController controller) {
3938
final VideoPlayerValue value = controller.value;
4039

41-
if (Platform.isAndroid) {
40+
if (defaultTargetPlatform == TargetPlatform.android) {
4241
if (value.isBuffering) {
4342
// -> Check if we actually buffer, as android has a bug preventing to
4443
// get the correct buffering state from this single bool.

0 commit comments

Comments
 (0)