diff --git a/packages/video_player_videohole/lib/video_player.dart b/packages/video_player_videohole/lib/video_player.dart index 6f40216fa..7988fa79c 100644 --- a/packages/video_player_videohole/lib/video_player.dart +++ b/packages/video_player_videohole/lib/video_player.dart @@ -53,7 +53,7 @@ class VideoPlayerValue { this.volume = 1.0, this.playbackSpeed = 1.0, this.errorDescription, - this.isCompleted = false, + this.completed = false, }); /// Returns an instance for a video that hasn't been loaded. @@ -122,7 +122,7 @@ class VideoPlayerValue { /// /// Reverts to false if video position changes, or video begins playing. /// Does not update if video is looping. - final bool isCompleted; + final bool completed; /// The [size] of the currently loaded video. final Size size; @@ -168,7 +168,7 @@ class VideoPlayerValue { double? volume, double? playbackSpeed, String? errorDescription = _defaultErrorDescription, - bool? isCompleted, + bool? completed, }) { return VideoPlayerValue( duration: duration ?? this.duration, @@ -187,7 +187,7 @@ class VideoPlayerValue { errorDescription: errorDescription != _defaultErrorDescription ? errorDescription : this.errorDescription, - isCompleted: isCompleted ?? this.isCompleted, + completed: completed ?? this.completed, ); } @@ -208,7 +208,7 @@ class VideoPlayerValue { 'volume: $volume, ' 'playbackSpeed: $playbackSpeed, ' 'errorDescription: $errorDescription, ' - 'isCompleted: $isCompleted),'; + 'completed: $completed),'; } } @@ -421,7 +421,7 @@ class VideoPlayerController extends ValueNotifier { size: event.size, isInitialized: event.duration != null, errorDescription: null, - isCompleted: false, + completed: false, ); assert( !initializingCompleter.isCompleted, @@ -446,7 +446,7 @@ class VideoPlayerController extends ValueNotifier { // we use pause() and seekTo() to ensure the platform stops playing // and seeks to the last frame of the video. pause().then((void pauseResult) => seekTo(value.duration.end)); - value = value.copyWith(isCompleted: true); + value = value.copyWith(completed: true); _durationTimer?.cancel(); case VideoEventType.bufferingUpdate: value = value.copyWith(buffered: event.buffered); @@ -806,7 +806,7 @@ class VideoPlayerController extends ValueNotifier { value = value.copyWith( position: position, caption: _getCaptionAt(position), - isCompleted: position == value.duration.end, + completed: position == value.duration.end, ); }