Creates VideoPlayerController
using video_player, plays video obtained from an asset, tracks its state, and exposes playback controls.
Depends on video_player.
dependencies:
flutter_use_video: ^0.0.2
class Sample extends HookWidget {
@override
Widget build(BuildContext context) {
final videoController = useAssetVideo(
asset: "assets/video/get_started.mp4",
autoPlay: true,
looping: true,
);
return Container(
child: VideoPlayer(videoController),
);
}
}