Theme is the basic need of any mobile app. This is the basically a color combination of app arguments like Status bar color, Nav bar color, Menu Color, Buttons color etc...
These all things have same color combination in each other.
Now the question is, How to change the theme in Flutter?
Actually changing the theme in Flutter is very easy. Flutter library makes the theme change process is very normal.
Suppose we have a basic app and we need to change the theme.
Let show this in example-
This is the demo script of a Flutter app.
When you will execute this code, this will show this screen -
Now we learn, how to change theme of this demo app.
Change the color name at line no 21 from primarySwatch: Colors.blue, to primarySwatch: Colors.green, and you the output is -
Change the color name at line no 21 from primarySwatch: Colors.blue, to primarySwatch: Colors.red, and you the output is -
These all things have same color combination in each other.
Now the question is, How to change the theme in Flutter?
Actually changing the theme in Flutter is very easy. Flutter library makes the theme change process is very normal.
Suppose we have a basic app and we need to change the theme.
Let show this in example-
This is the demo script of a Flutter app.
When you will execute this code, this will show this screen -
Now we learn, how to change theme of this demo app.
Change the color name at line no 21 from primarySwatch: Colors.blue, to primarySwatch: Colors.green, and you the output is -
Change the color name at line no 21 from primarySwatch: Colors.blue, to primarySwatch: Colors.red, and you the output is -
Comments
Post a Comment