I want to extract dominant color from a image so that i can apply it as blending to other images. how can i achieve that??
In my current code i have given color manually but i want it to be generated by app.
class MyApp extends StatelessWidget {
Color face = new HexColor("a8a8a8");
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Image from assets"),
),
body: Column (
mainAxisAlignment: MainAxisAlignment.center,
children:<Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
children:<Widget>[
new Image.asset('assets/images/6.jpg',
color: face, colorBlendMode:BlendMode.modulate ,
fit:BoxFit.cover,
height: 50,
width: 50,
),
new Image.asset('assets/images/1.jpg',
color: face, colorBlendMode: BlendMode.modulate,
fit:BoxFit.cover,
height: 200,
width: 200,
),
]),
])),
);
}
}