In this article we are going to build a Simple Flutter app from stratch and implement Dark Theme and Light Theme concept.

-------------------

Lets 1st create a Flutter project by using the command " flutter create themeapp " and the to insert into the project directory use command " cd themeapp ". To open in VS Code " code . "


 After this process the interface should look like this.

------------------------

Now create a folder "assets" in the project directory and go to "pubspec.yaml" file --> remove the hash symbol before assets under flutter --> mention the assets folder along with "/". 

Note that the " - " before "assets/" needs to be indented properly.


Create a new dart file "AppHome.dart" as HomePage demo layout which will look like the following and you will find the source code in github.  



--------------------

Now we can include theme property to get the Dark theme or Light theme acording to the system theme, i.e if the System theme is dark then the Dark theme version will be enabled and vice versa.



We can now dynamically change the theme of our app according to system theme.


---------------------


Final Thoughts
I hope you find this article helpful and worth it.  Feel free to share it with your developer friend.
Happy Coding 🙌