I am doing a little experiment in a dart, and I could not find a way to determine if the variable is “callable”, without explicitly checking for each type (String, int, bool, ect) and assuming that it was called if it is none of this . I also experimented with try / catch, which just seems wrong to me.
What is the right way, or at least the best way to make this determination?
Here is an example that I did to show what I'm trying to execute:
https://gist.github.com/digitalfiz/3f431dc07ca761389062
source
share