In this article I’ll discuss coding for dark mode in past, recent and future OS releases when writing apps in Flutter.

Image for post
Image for post

Flutter was built with theming, so dealing with OS-level dark mode is pretty straightforward. But it’s not that simple. You also have to:

  • Make custom widgets (or decorations like gradients or shadows) and non-platform flutter widgets (from packages like Google Maps, for example) look acceptable in all themes.
  • Make sure custom widgets (or decorations) update properly when the user changes the theme on their device.
  • Degrade gracefully for users running on older versions of their operating systems and users that prefer to set the theme on individual apps. …

Paul Mutisya

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