FloodFillImage class

Inheritance

Constructors

FloodFillImage({Key? key, required ImageProvider<Object> imageProvider, required Color fillColor, bool isFillActive = true, List<Color>? avoidColor, int tolerance = 8, int? width, int? height, AlignmentGeometry? alignment, Widget? loadingWidget, dynamic onFloodFillStart(Offset position, Image image)?, dynamic onFloodFillEnd(Image image)?})
Flutter widget that can use paint bucket functionality on the provided image.
const

Properties

alignment AlignmentGeometry?
Alignment of the image.
final
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.
final
fillColor Color
Color use for filling the area.
final
hashCode int
The hash code for this object.
no setterinherited
height int?
Height of the image. Parent widget height will be prioritize if it's provided and less than the image height.
final
imageProvider ImageProvider<Object>
The image to display via ImageProvider.
You can use AssetImage or NetworkImage.
final
isFillActive bool
Set false if you want to disable on touch fill function.
Default value is true.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingWidget Widget?
Widget to show while the image is being processed on initialization.
It uses CircularProgressIndicator by default.
final
onFloodFillEnd → (dynamic Function(Image image)?)
Callback function that returns an Image from dart:ui when flood fill ended.
final
onFloodFillStart → (dynamic 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.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tolerance int
Set fill value tolerance that ranges from 0 to 100.
Default value is 8.
final
width int?
Width of the image. Parent widget width will be prioritize if it's provided and less than the image width.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _FloodFillImageState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited