What is the core difference between the runApp() and main() function? why do we use the runApp() and main() function in the beginning of the flutter code...
Asked
Active
Viewed 2,268 times
1 Answers
1
1-> main()-=>this is the main function. The flutter compiler doesn't allow to compile of any line of code
2->runApp()--=>this is the main function that runs the main screen. With help of this widget, you can run those screens that you want to run. This screen is known as the root screen of your app.

M Azam Khan
- 302
- 3
- 15