Curly braces define scope. Both for regular variables and for functions. We cannot use the global version of f() if we declare f internally as well.

examples/intro/lexical_scope.dart
h() {
  print("In external h");
}


f() {
  print("In f");
  g() {
    print("In g");
  }
  h() {
    print("In internal h");
  }

  g();
  h();
}


main() {
  f();
  //g();   // Not declared


  //f() {
  //  print("New f");
  //}

  h();
}
examples/intro/lexical_scope.out
In f
In g
In internal h
In external h