truvideo_camera_sdk 1.0.1 copy "truvideo_camera_sdk: ^1.0.1" to clipboard
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 #

  1. Add TruvideoCameraSdk Plugin to your project.
  2. Install dependencies:
    flutter pub get
    
  3. Ensure proper permissions in AndroidManifest.xml & Info.plist.
  4. 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.

0
likes
140
points
39
downloads

Publisher

verified publishertruvideo.com

Weekly Downloads

Access the device camera to capture photos and videos, saving them in the app’s storage and returning file paths for use.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on truvideo_camera_sdk

Packages that implement truvideo_camera_sdk