Pattern: Missing use of function declaration to bind function to a name
Issue: -
As Dart allows local function declarations, it is a good practice to use them in the place of function literals.
Example of incorrect code:
void main() {
var localFunction = () {
...
};
}
Example of correct code:
void main() {
localFunction() {
...
}
}