Geek Culture
Published in

Geek Culture

Flutter 3: How to extend ThemeData

In 2019, I have written an article about extending the flutter ThemeData class by using Extension methods. In my opinion, that was just a workaround; it has some drawbacks and it’s not very elegant. With the release of Flutter 3.0, it comes with a better solution: the ThemeExtension class.

The New Solution

We are going to make the bootstrap flavoured colour scheme, just like the last time:

--

--

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