搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。