搜索插件、代码仓与 APP 分类

camera_filters 封面
插件详情v0.3.1

camera_filters

此包将使用带有动态滤镜颜色列表的相机,裁剪您的图像,添加文字到图像并更改文字颜色。

AndroidiOS
近 30 天下载
185
喜欢数
51
Pub 分数
120

安装插件

flutter pub add camera_filters

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

camera_filters 包使 Flutter 开发者能够集成带有实时滤镜效果、图像裁剪和文本叠加功能的相机界面。它支持动态基于颜色的滤镜,允许用户裁剪拍摄的图像,并提供选项以添加和自定义文本,且可调整颜色。专为 Android 和 iOS 设计,该包简化了在移动应用中实现高级相机功能的过程。此包非常适合需要交互式视觉增强功能的社交媒体、照片编辑或内容创作应用程序。

适合场景

  • 社交媒体应用照片捕捉
  • 带有滤镜的照片编辑工具
  • 用户生成内容平台
  • 实时图像标注
  • 自定义相机接口
  • 创意故事讲述应用

主要特点

  • 动态颜色滤镜
  • 图像裁剪功能
  • 带有颜色自定义的文本叠加
  • 实时预览
  • 跨平台支持(Android 和 iOS)
  • 通过 pub add 命令进行简单集成

适合对象

  • 移动应用开发者
  • 摄影和编辑应用
  • 内容创作者
  • 交互式相机界面
  • 需要实时图像修改的应用程序

使用建议

  • 需要 Android 和 iOS 的相机权限
  • 仅限基本文本样式
  • 可能会影响低端设备的性能
  • 无内置保存或分享功能
  • 依赖外部GitHub仓库进行更新

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Camera Filters

Realtime Camera Filters

Description

This package will use camera with dynamic color list of filters, crop your image, text on image , change the text color and you can also use emojis. You can use your own custom color list to change filters. In the end it will provide you an edited image in onDone listener

Features

  • Realtime Camera Filters.
  • Draw, add text change filters in camera.
  • Filters on video.
  • TextOverlay on video.

IOS

The camera_filters plugin compiles for any version of iOS, but its functionality requires iOS 10 or higher. If compiling for iOS 9, make sure to programmatically check the version of iOS running on the device before using any camera_filters plugin features.

Add two rows to the ios/Runner/Info.plist:

  • one with the key Privacy - Camera Usage Description and a usage description.
  • and one with the key Privacy - Microphone Usage Description and a usage description. If editing Info.plist as text, add:
    <key>NSCameraUsageDescription</key>
    <string>your usage description here</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>your usage description here</string>

Android

  • Change the minimum Android sdk version to 24 (or higher) in your android/app/build.gradle file.
    minSdkVersion 24

Step 1. Ensure the following permission is present in your Android Manifest file, located in /android/app/src/main/AndroidManifest.xml:

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Step 2. Add the JitPack repository to your Android build file, located in /android/build.gradle:

    allprojects {
    repositories {
    maven { url 'https://jitpack.io' }
    }
}

Usage

Example

To use this package:

    dependencies:
      flutter:
        sdk: flutter
      camera_filters: <latest-version>

ScreenShots

1 2

3 4

Video

pack

!

How to use

    import 'package:camera_filters/camera_filters.dart';
    import 'package:flutter/material.dart';
    
    void main() {
      WidgetsFlutterBinding.ensureInitialized();
      runApp(MyApp());
    }
    
    class MyApp extends StatefulWidget {
      @override
      _MyAppState createState() => _MyAppState();
    }
    
    class _MyAppState extends State<MyApp> {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            body: CameraScreenPlugin(onDone: (value) {
              /// value returns the picture path you can save here or navigate to some screen
              print(value);
            },


                /// time limit for video in seconds
                videoTimeLimit: 10,


                /// value returns the video path you can save here or navigate to some screen
                onVideoDone: (value) {
              print(value);
            }
    
                /// profileIconWidget: , if you want to add profile icon on camera you can your widget here
    
                ///filterColor: ValueNotifier<Color>(Colors.transparent),  your first filter color when you open camera
    
                /// filters: [],
                ///you can pass your own list of colors like this List<Color> colors = [Colors.blue, Colors.blue, Colors.blue ..... Colors.blue]
                ///make sure to pass transparent color to first index so the first index of list has no filter effect
                ),
          ),
        );
      }
    }

所属分类

依赖

依赖清单 9 项

源码仓库

使用此插件的项目

暂无相关数据。