import 'dart:async'; import 'package:flutter/material.dart'; import 'player/player.dart'; import 'player/video_rect_support.dart'; /// Video widget for displaying player output. /// /// This widget displays the video output from a [Player] instance /// and optionally overlays custom controls. /// /// Example usage: /// ```dart /// final player = Player(); /// /// Video( /// player: player, /// controls: (context) => MyCustomControls(), /// ) /// ``` class Video extends StatefulWidget { /// The player instance. final Player player; /// Builder for custom video controls overlay. final Widget Function(BuildContext context)? controls; /// Background color shown behind the video. final Color backgroundColor; const Video({super.key, required this.player, this.controls, this.backgroundColor = Colors.black}); @override State