Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/features/exercises/widgets/videos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,15 @@ class _ExerciseVideoWidgetState extends ConsumerState<ExerciseVideoWidget> {
alignment: Alignment.bottomCenter,
children: [
VideoPlayer(controller),
_ControlsOverlay(controller: controller),
// Rebuild the overlay whenever the controller notifies (it is a
// ValueNotifier). Reading controller.value.isPlaying does not
// subscribe to changes, so without this the play icon never
// disappears once playback starts.
ValueListenableBuilder<VideoPlayerValue>(
valueListenable: controller,
builder: (context, value, child) =>
_ControlsOverlay(controller: controller),
),
VideoProgressIndicator(controller, allowScrubbing: true),
],
),
Expand Down