In order to write any Dart program, be it a script or a Flutter app, you must define a function called main . This function tells Dart where the program starts , and it must be in the file that is considered the “entry point” for you program. By convention, this will be in a file called main.
What is the main function in Flutter?
In order to write any Dart program, be it a script or a Flutter app, you must define a function called main . This function tells Dart where the program starts, and it must be in the file that is considered the “entry point” for you program . By convention, this will be in a file called main.