How to use dark theme mode in Flutter?

This Article is posted by seven.srikanth at 5/23/2019 6:43:15 PM



Use dark Theme mode filed in Material app. That way when OS toggles dark mode, and app switches between light and dark themes. You can also switch it manually using platformbrightness property on media query. 
See example below.
MaterialApp(
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
)

Tags: dark theme








2 Comments
Login to comment.
Recent Comments

damir at 8/14/2019

Thank you.

Login to Reply.

seven at 8/23/2019

:)



© 2018 - Fluttercentral | Email to me - seven.srikanth@gmail.com