call<T> method
Implementation
T call<T>(String key, T secondary) {
var root = this;
if (root is Map<String, dynamic>) {
var data = root[key];
if (data is T) {
return data;
} else {
return secondary;
}
} else {
if (root is T) {
return root;
} else {
return secondary;
}
}
}