Is it possible to pass a Function with parameters to a VoidCallback?
for example something like this:
class MyClass {
void doSomething(int i){
}
Instead of VoidCallback, you can use ValueChanged, here is an example:
class MyClass {
static void doSomething(int i) {}
MyOtherClass myOtherClass = MyOtherClass(doSomething);
}
class MyOtherClass {
final ValueChanged callback;
MyOtherClass(this.callback);
}
You can then call callback with any int value
callback(10);