What is the difference between the two mentioned below
void func1() { print('Hello World') }
and
func1() { print('Hello World') }
If you omit types that cannot be inferred (whether return types, parameter types, etc.), the default type is dynamic.
You can verify this yourself by going to https://dartpad.dartlang.org/ , entering a function with no return type:
func1() { print('Hello World'); }
and clicking on it. DartPad's Documentation pane will tell that func1 has a return type of dynamic.