In Dart, is it possible to have a list of functions that have a well defined signature? I'm looking for something like
List<(int, int) -> int> listOfFunctions;
which is of course wrong.
I can do
List<Function> listOfFunctions;
but then I don't know the signature.
Thanks for any hints.
Just create a typedef for your function
typedef int MyFunction(int a, int b);
List<MyFunction> listOfFunctions;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With