Solved: Function and Function()
What is difference between Function and Function() in Dart/Flutter? for example in such a code final Function x; final Function() x;
As stated in the
Function documentation, it is:
The base class for all function types.
A variable declared with type
Function therefore can be assigned any function. However, you won't get any type-safety when invoking it.
Function() type is a function with an unspecified (i.e.,
dynamic) return type and that takes zero arguments.