camerax 0.1.2 copy "camerax: ^0.1.2" to clipboard
camerax: ^0.1.2 copied to clipboard

A camera plugin for flutter, which use CameraX on Android, native API on iOS, supports camera preview, capture and analyze.

example/lib/main.dart

import 'package:flutter/foundation.dart';
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: HomeView(),
      theme: ThemeData.light().copyWith(platform: TargetPlatform.iOS),
      routes: {
        'analyze': (context) => AnalyzeView(),
        'display': (context) => DisplayView(),
      },
    );
  }
}
39
likes
130
pub points
79%
popularity

Publisher

verified publisheryanshouwang.dev

A camera plugin for flutter, which use CameraX on Android, native API on iOS, supports camera preview, capture and analyze.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on camerax