What is the difference between runApp() and main()?

 

  • main() is the entry point of the Dart program.

  • runApp() inflates the given widget and attaches it to the screen.

Example:

void main() { runApp(MyApp()); }

Comments

Popular posts from this blog

1. What is Flutter?

What is FutureBuilder and StreamBuilder?