usb_camera_plugin 0.0.4 copy "usb_camera_plugin: ^0.0.4" to clipboard
usb_camera_plugin: ^0.0.4 copied to clipboard

A Flutter plugin for accessing and controlling USB cameras on Android devices. Supports UVC cameras, video recording, image capture, and real-time preview with effects. Currently in early development [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:usb_camera_plugin/usb_camera_plugin.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _usbCameraPlugin = UsbCameraPlugin();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('USB Camera Plugin'),
          backgroundColor: Colors.blue,
          foregroundColor: Colors.white,
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              const Icon(Icons.videocam, size: 100, color: Colors.blue),
              const SizedBox(height: 40),
              ElevatedButton.icon(
                onPressed: () async {
                  try {
                    await _usbCameraPlugin.openCamera();
                  } catch (e) {
                    print('Error: $e');
                  }
                },
                icon: const Icon(Icons.camera_alt),
                label: const Text('Open USB Camera'),
                style: ElevatedButton.styleFrom(
                  backgroundColor: Colors.blue,
                  foregroundColor: Colors.white,
                  padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 15),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
0
points
9
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for accessing and controlling USB cameras on Android devices. Supports UVC cameras, video recording, image capture, and real-time preview with effects. Currently in early development - test via example app.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on usb_camera_plugin

Packages that implement usb_camera_plugin