camera_works 0.0.1 camera_works: ^0.0.1 copied to clipboard
A camera plugin for flutter, which use CameraX on Android, native API on iOS, supports camera capture, flash, & switch camera.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'views.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final style =
SystemUiOverlayStyle.light.copyWith(statusBarColor: Colors.transparent);
SystemChrome.setSystemUIOverlayStyle(style);
return MaterialApp(
home: HomePage(),
theme: ThemeData.light(),
routes: {
'analyze': (context) => CameraPage(),
},
);
}
}