Reputation: 1467
I have a function with a callback void doSth(Function callback)
, however I would like to specify the parameters and return value of the callback like in Java.
Is this possible in Dart?
(I can't use Future here)
Upvotes: 1
Views: 1139
Reputation: 657148
void doSth(String Function callback(int /* type for parameter */ ))
Upvotes: 2