Open
Description
Seems like Dart analysis gets confused when using assignment initializer with anonymous functions. For instance:
class Foo {
final VoidCallback bar;
Foo() : bar = () {}; // Expected an identifier.
}
When wrapping the function in parenthesis, the error goes away:
class Foo {
final VoidCallback bar;
Foo() : bar = (() {}); // Fine.
}
I'm not sure whether this behavior is expected, but I cannot see any reason why it should be.