truvideo_camera_sdk 1.0.1
truvideo_camera_sdk: ^1.0.1 copied to clipboard
Access the device camera to capture photos and videos, saving them in the app’s storage and returning file paths for use.
Truvideo Camera SDK #
This plugin integrates TruvideoCameraSdk
for capturing photos and videos.
Supported Platforms #
- ✅ Android
- ✅ iOS
Features #
- Opens the camera with configurations
- Supports front/rear camera selection
- Captures images and records videos
- Handles camera events
Requirements #
- Flutter SDK
- TruvideoCameraSdk Plugin
Setup #
- Add TruvideoCameraSdk Plugin to your project.
- Install dependencies:
flutter pub get
- Ensure proper permissions in
AndroidManifest.xml
&Info.plist
. - Run the app:
flutter run
Usage #
- Initialize platform state:
Future<void> initPlatformState() async { _platformVersion = await TruvideoCameraSdk.getPlatformVersion() ?? 'Unknown'; setState(() {}); }
- Listen to camera events:
TruvideoCameraSdk.events.listen((event) { print("Event: \${event.type}, Data: \${event.data?.toJson()}"); });
- Open camera:
final config = CameraConfiguration( lensFacing: TruvideoSdkCameraLensFacing.front, flashMode: TruvideoSdkCameraFlashMode.off, orientation: TruvideoSdkCameraOrientation.portrait, outputPath: outputPath ?? '', mode: CameraMode.videoAndImage(videoMaxCount: 3, imageMaxCount: 5, durationLimit: 60), ); await TruvideoCameraSdk.openCamera(configuration: config);
License #
MIT #
Support #
If you have any questions or suggestions regarding the SDK, please contact us at support@truvideo.com.