pixel_color_image

Last updated:

0 purchases

pixel_color_image Image
pixel_color_image Images
Add to Cart

Description:

pixel color image

https://pub.dev/packages/pixel_color_image


Usage #
1. Widget #

image in assets folder

PixelColor.assetImage(
path: 'images/xxx.png',
onHover: onHover,
onTap: onTap,
);
copied to clipboard

image by URL

PixelColor.networkImage(
url: 'https://example.com/xxx.png',
onHover: onHover,
onTap: onTap,
);
copied to clipboard
2. functions are called #
/// While Hoverring
void onHover(int x, int y, Color color) async {
debugPrint('Hover x: $x, y: $y, color: $color');
}

/// When tap
void onTap(int x, int y, Color color) async {
debugPrint('Tap x: $x, y: $y, color: $color');
}
copied to clipboard



Color-Preview Widget #

1. Define ref #
final ref = PixelColorRef();
copied to clipboard
2. Connect widgets with ref #
// Image
PixelColor.assetImage(
...
...
ref: ref,
);

// Color Preview
PixelColorPreview(
ref: ref,
);
copied to clipboard

🎉 any issues, requests, contributions are welcomed!

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.