Member-only story

Flutter Themes, Jekyll And Hyde

Fred Grott
5 min readDec 14, 2021

--

By Photo by Henry Van der Weyde (1838–1924; London, England)

Ah, the Jekyll and Hyde feeling of good and evil in the way we have to theme Flutter Apps to deal with differences between Apple and Non-Apple devices. It’s even one of the least covered subjects, even in the Flutter Docs themselves.

My job in building a modified best practices Flutter Skeleton app, other than to show some heavy duty best practices in all areas of Flutter App development; is to make all the mistakes that everyone will make on relying upon the flutter docs in the first place. And, then steer you away from those mistakes.

So let me show you my mistakes and what to do instead!

Why Do We Have An Inherited Widget Named Theme

Everyone probably never gives the call:

Theme.of(context)

a second glance. But now let me explain it. In each Root App, both MaterialApp and CupertinoApp we get access to themes via the Inherited Widget Theme, here let me show you:

In other words, when I put the inherited widget Theme at my root of my…

--

--

Fred Grott
Fred Grott

No responses yet