flutter_uvc_camera 0.0.1
flutter_uvc_camera: ^0.0.1 copied to clipboard
flutter android uvc camera plugin.
import 'package:flutter/material.dart';
import 'package:flutter_uvc_camera/uvc_camera_controller.dart';
import 'camera.dart';
void main() {
runApp(const MaterialApp(home: MyApp()));
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final cameraController = UVCCameraController();
@override
void initState() {
super.initState();
_incrementCounter();
}
void _incrementCounter() {
setState(() {});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('uvc设备测试')),
body: Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const SizedBox(height: 40),
TextButton(
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => const CameraTest()));
setState(() {});
},
child: const Text('摄像头页面')),
const SizedBox(height: 20),
],
),
),
),
);
}
}