floodfill_widget library
A widget that displays an image and allows flood fill operations on it.
The FloodFillWidget fetches an image from a given URL, displays it, and allows the user to perform flood fill operations by tapping on the image. The filled image is then updated and a callback is triggered with the new image.
The widget requires the following parameters:
newColor
: The color to be used for the flood fill operation.onImageChanged
: A callback that is triggered when the image is updated after a flood fill operation.imageUrl
: The URL of the image to be fetched and displayed.loadingWidget
: An optional widget to be displayed while the image is being loaded.width
: An optional width for the displayed image.height
: An optional height for the displayed image.
Example usage:
FloodFillWidget(
newColor: Colors.red,
onImageChanged: (image) {
// Handle the updated image
},
imageUrl: 'https://example.com/image.png',
loadingWidget: CircularProgressIndicator(),
width: 300,
height: 300,
)