Closed
Description
In Dart 2 I am seeing infos about some typing (uses_dynamic_as_bottom
) and I don't know how I would get around it.
Basically I have something like:
new A()
..func = (int a) {};
Where A.func is of typeFunction(dynamic a)
If I make it Function(Object a)
then it becomes an error:
"A value of type '(int) → Null' can't be assigned to a variable of type 'Function(Object) → dynamic'."
I put together a dartpad of a few things to try and make something work and clarify some rules for myself, but I couldn't find a way to make inline functions like that work.
https://dartpad.dartlang.org/22a4849f9f0d2fcd3813024df252adf0
Thanks!