The top level of a Dart program is a group of definitions, like in Java or C#, instead of a series of imperative statements. That makes it easier for static analysis, since you don't have strange constructs like:
if (itsTuesday) {
class Foo {
...
}
}
It also means mutual recursion just works, without weird semantic shenanigans like hoisting in JavaScript. In Dart, the top-level is "simultaneous": all of those definitions are
static with no mixing of side-effecting imperative code at the top-level which would make ordering matter.
The main side-effect of this approach is that you have to wrap your entrypoint imperative code in a main() function. It's a pretty small price to pay, especially in an application with thousands of lines of code.