搜尋套件、儲存庫與 APP 分類

floodfill_image 封面
套件詳情v0.0.8

floodfill_image

可在提供的影像上使用油漆桶功能的 Flutter 小部件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
99
喜歡數
71
Pub 分數
140

安裝套件

flutter pub add floodfill_image

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

floodfill_image 套件提供了一個 Flutter 小工具,可在影像上實現油漆桶功能,讓使用者能以選定的顏色填滿連續區域。非常適合需要在定義邊界內套用顏色填充的互動式繪圖與編輯應用程式。此套件支援多個平台,包括 Android、iOS、Web、macOS、Windows 與 Linux,確保廣泛的相容性。它可無縫整合至現有的 Flutter 應用程式,並提供簡單的 API 來實作影像小工具上的洪水填充作業。

適用情境

  • 互動圖像著色應用
  • 數位繪圖工具
  • 圖像編輯功能
  • 教育繪圖應用
  • 使用者驅動的圖形顏色填補

主要特色

  • 油漆桶填色功能
  • 跨平台支援
  • 與 Image 小部件的簡單整合
  • 即時填入更新
  • 支援多種影像來源

適合對象

  • 開發繪圖工具的應用程式開發者
  • 教育軟體創作者
  • 使用 Flutter 的數位藝術家
  • 需要互動式圖像操作的應用程式
  • 需要快速填滿圖像顏色的使用者

使用建議

  • 效能可能因大圖或複雜影像而異
  • 僅限像素基礎的填色,不支援進階遮罩
  • 需要仔細處理觸控輸入以確保精確度
  • 可能需要對高解析度圖像進行優化
  • 不適用於基於向量的圖像編輯

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Flood Fill Image

Version GitHub license Support

Overview

Flutter widget that can use paint bucket functionality on the provided image using Queue-Linear Flood Fill Algorithm by J. Dunlap. For more info check out my blog : Flood Fill in Flutter

Kindly like:+1: the package at pub dev or star:star: the repo in github if you find this library useful. :wink:

demo dog gif

Usage

FloodFillImage(
    imageProvider: AssetImage("assets/dog.jpg"),
    fillColor: Colors.amber,
    avoidColor: [Colors.transparent, Colors.black],
)

Parameters

Name Type Description
imageProvider ImageProvider The image to display via ImageProvider.
You can use AssetImage or NetworkImage.
fillColor Color Color use for filling the area.
isFillActive bool Set false if you want to disable on touch fill function.
Default value is true.
avoidColor List<Color> List of color that determines to which Color is/are needed to be avoided upon touch.
Note: Nearest color shade is applied.
tolerance int Set fill value tolerance that ranges from 0 to 100.
Default value is 8.
width int Width of the image. Parent widget width will be prioritize if it's provided and less than the image width.
height int Height of the image. Parent widget height will be prioritize if it's provided and less than the image height.
alignment AlignmentGeometry Alignment of the image.
loadingWidget Widget Widget to show while the image is being processed on initialization.
It uses CircularProgressIndicator by default.
onFloodFillStart Function(Offset position,Image image) Callback function that returns the touch position and an Image from dart:ui when flood fill starts.
Note: Touch coordinate is relative to the image dimension.
onFloodFillEnd Function(Image image) Callback function that returns an Image from dart:ui when flood fill ended.

Coffee

Buy Me A Coffee

License

MIT License, see the LICENSE.md file for details.

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。