pixel_color_picker
a widget that extracts colors from its childs.
this package lets you basically extract colors from everything in your screen.
getting started
in the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
...
pixel_color_picker:
import the package in your code:
import 'package:local_hero/local_hero.dart';
usage
wrap the target widget inside pixelcolorpicker
:
pixelcolorpicker(
child: image.asset('image.png'),
onchanged: (color) {
setstate(() {
this.color = color;
});
}
);
and whenever the user taps the child, the onchanged
event will give the color of the pixel on that position.
it’s still under development, but you can already play with it.
Comments are closed.