flutter_camera 1.0.0 copy "flutter_camera: ^1.0.0" to clipboard
flutter_camera: ^1.0.0 copied to clipboard

A Flutter plugin for iOS and Android allowing access to the device cameras and recording of videos.

example/example.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_camera/flutter_camera.dart';

class CameraPage extends StatefulWidget {
  const CameraPage({Key? key}) : super(key: key);

  @override
  _CameraPageState createState() => _CameraPageState();
}

class _CameraPageState extends State<CameraPage> {
  @override
  Widget build(BuildContext context) {
    return FlutterCamera(
      color: Colors.amber,
      onImageCaptured: (value) {
        final path = value.path;
        print("::::::::::::::::::::::::::::::::: $path");
        if (path.contains('.jpg')) {
          showDialog(
              context: context,
              builder: (context) {
                return AlertDialog(
                  content: Image.file(File(path)),
                );
              });
        }
      },
      onVideoRecorded: (value) {
        final path = value.path;
        print('::::::::::::::::::::::::;; dkdkkd $path');
      },
    );
    // return Container();
  }
}
24
likes
130
points
264
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for iOS and Android allowing access to the device cameras and recording of videos.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

camera, flutter

More

Packages that depend on flutter_camera