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();
  }
}
copied to clipboard
24
likes
120
points
212
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.23 - 2025.04.07

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

Repository (GitHub)

Documentation

API reference

License

unknown (license)

Dependencies

camera, flutter

More

Packages that depend on flutter_camera