Flutter app with a touch of Material You colors, please

Getting colors using a platform channel

system_accent1_0
system_accent1_10
system_accent1_50
...

Guessing Material You colors usage

Calculator

Gmail

Gboard

Using Material You colors in Flutter

FutureBuilder(
future: getMaterialYouColor(),
builder: (context, AsyncSnapshot<MaterialYouPalette?> snapshot) {
final primarySwatch = snapshot.data?.accent1 ?? Colors.blue;
return MaterialApp(
theme: ThemeData(
primarySwatch: primarySwatch,
...

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Blur effect to views using Cloudy

Kotlin Coroutines in Android — Suspending Functions

Deploying flutter apps to the PlayStore

Migrating from LiveData to Kotlin’s Flow | by Jose Alcérreca | Android Developers | May, 2021

Don’t think about rotation of the screen. Moxy fix the problem.

How to Send a Semi Secure Request to a Server in Android

5 Key Benefits of Native Mobile App Development

Razer Phone Download Mode Waiting For Device

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alexander

Alexander

More from Medium

Flutter Interview Questions

Package of the week: Badges. Full example with Badges + Riverpod + App Badger + shared_preferences

Automatic app signing with Gradle, and Generate release SHA1 signature for Android in Flutter

How to connect Firebase with your Flutter Android Application