my_filter_camera 1.0.4+1 copy "my_filter_camera: ^1.0.4+1" to clipboard
my_filter_camera: ^1.0.4+1 copied to clipboard

This package lets you use the camera with advanced digital filters, apply real-time effects, and customize your camera experience easily.

GitHub Buy Me A Coffee PayPal Sponsor Support Me on Ko-fi

Camera with Filters Plugin for Flutter #

A Flutter plugin for capturing photos and videos with advanced digital filters. This package provides a seamless interface for applying real-time effects to your camera feed and capturing moments with style and creativity.

Features #

  • Capture photos and videos with advanced real-time filters.
  • Apply a variety of pre-defined or custom digital effects programmatically.
  • Adjustable camera configurations: brightness.
  • Support for front and rear cameras.
  • Highly customizable and easy to integrate into your Flutter project.
Features Android iOS
Ask permissions
Enable/disable audio
Take photos
Photo live filters
Exposure level
Device flash support
Live switching camera

Installation and usage #

Example

Add the package to your pubspec.yaml #

dependencies:
  my_filter_camera: ^latest_version

Set up platform #

  • Android Add permission to your AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Import the package to your project #

import 'package:my_filter_camera/my_filter_camera.dart';

And then, you can use camera function.

Initialize camera #

final CameraViewController controller= CameraViewController();
  • Display camera preview widget
CameraView(
  autoDispose: false,
  controller: controller,
  onDetect: (data, args) {
    setState(() {});
  },
),
  • To start camera, use controller.start() function, and use controller.stop to stop camera.
  • controller.switch() change front and rear camera direction

Filter types #

Filter type

  • Update filter type:
await controller.updateFilter(filterType: PluginFilterEnum.values[index].code,);
  • You can find all filter list in PluginFilterEnum

Capture Image #

Capture Image

  • To capture realtime image, use:
final xFile = await controller.capture();

Exposure level #

  • To adjust Camera lever:
controller.adjustBrightness(value: value.toInt());

Important note!!!! #

Remember stop or dispose camera when not using camera anymore to avoid increase ram memory

 @override
void dispose() {
  controller.dispose();
  super.dispose();
}
//or
controller.stop();

Contribute #

Any comments please contact us ThaoDoan and DucNguyen

4
likes
150
points
11
downloads
screenshot

Publisher

verified publisherwongcoupon.com

Weekly Downloads

This package lets you use the camera with advanced digital filters, apply real-time effects, and customize your camera experience easily.

Repository (GitHub)

Topics

#camera #photo-filters #real-time-effects #photography #media

Documentation

API reference

License

MIT (license)

Dependencies

cross_file, flutter, plugin_platform_interface

More

Packages that depend on my_filter_camera