Is it possible to pass a Function with parameters to a VoidCallback?
for example something like this:
class MyClass {
void doSomething(int i){
}
Just replace VoidCallback with Function(int)
class MyClass {
void doSomething(int i){
}
MyOtherClass myOtherClass = new MyOtherClass(doSomething);
}
class MyOtherClass {
//OP code (does not work): final VoidCallback callback(int);
final Function(int) callback;
MyOtherClass(this.callback);
callback(5);
}