When the built in Theme is not enough

Theming UI heavy apps in Flutter

A different approach to styling your app

Jelena Lecic
4 min readJun 8, 2022

--

These days most apps support dark and light themes(modes), so you want to add that feature to your app too.

Yes, we all know that you can specify Theme in your MaterialApp, but that is not enough for an UI rich app. We want gradients, we want lots of colors and many custom components.

When you use predefined widgets, like AppBar, you can specify your colors in the app theme, like this:

… and by using this, all AppBars in your app will look the same.

But, if we want custom Widgets, written from scratch, we need to store all those colors somewhere.

Take a look at the bottom left button:

--

--