In order to write any Dart program, be it a script or a Flutter app, you must define a function called main . void main() { print(‘Hello, Dart’); } This function tells Dart where the program starts, and it must be in the file that is considered the “entry point” for you program .
Read moreWhy void main is used in Dart?
void is the return type of the function. This means that when the function executes all the code inside, it should return this value .
Read more