FLUTTER ECOSYSTEM

garlen-javier/FloodFill_Image

제공된 이미지에서 페인트 버킷 기능을 사용할 수 있는 Flutter 위젯입니다.

FloodFill_Image 프로젝트 이미지
Stars
28
Forks
21
최근 푸시(UTC)
2022. 9. 5.
프로젝트 상태
활성
garlen-javier GitHub avatar
GITHUB User

garlen-javier ↗

Mobile & Game Developer

언어DartSwiftKotlinObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • image^3.0.1
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

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.