Skip to content

Instantly share code, notes, and snippets.

@ponnamkarthik
Last active October 28, 2020 01:11
File _cameraVideo;
final picker = ImagePicker();
// This funcion will helps you to pick a Video File from Camera
_pickVideoFromCamera() async {
PickedFile pickedFile = await picker.pickVideo(source: ImageSource.camera);
_cameraVideo = File(pickedFile.path);
_cameraVideoPlayerController = VideoPlayerController.file(_cameraVideo)..initialize().then((_) {
setState(() { });
_cameraVideoPlayerController.play();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment