For help getting started with Flutter, view our online documentation.
Flutter plugin for capturing and picking image and videos and getting thumbnail from videos on the Android & iOS devices.
Simply add a dependency to you pubspec.yaml for camera_utils.
Then import the package in your dart file with
import 'package:camera_utils/camera_utils.dart';
-
Capture Image
// Capture image final path = await CameraUtils.captureImage;
-
Pick Image
// Pick image final path = await CameraUtils.pickImage;
-
Capture Video
// Capture video final path = await CameraUtils.captureVideo;
-
Pick Video
// Pick video final path = await CameraUtils.pickVideo;
-
Thumbnail from Video
// Pass the path and get thumbnail from video Future<String> thumbPath = CameraUtils.getThumbnail(path); thumbPath.then((path) { setState(() { _thumbPath = path; print(path); }); });