Flutter Theme Widget | RRTutors

Flutter Theme Widget

When we build a Flutter app, we build a root Widget. That Widget usually returns a MaterialApp, which builds the foundations for the app. One of the constructor arguments for MaterialApp is the Theme object. This object specifies the colors to be used in the application’s Widgets. As you can see below the user can pass in Theme data into the MaterialApp constructor using a ThemeData object

 

Change Dynamic theme 

Find example here https://rrtutors.com/tutorials/How-to-dynamically-change-the-theme-in-Flutter-ThemeProvider

 

Advertisements