You can create a ColorScheme from an image using the .fromImageProvider constructor 🖌️
This constructor "extracts the dominant color" from your image and creates a ColorScheme with "harmnonious colors that meet contrast requirements for accessibility":
ColorScheme? colorScheme;
void setColorScheme(ColorScheme val) {
setState(() => colorScheme = val);
}
@override
void initState() {
super.initState();
ColorScheme.fromImageProvider(provider: const AssetImage('assets/logo.jpeg')).then((value) {
setColorScheme(value);
});
}