from static method
Implementation
static APIHandler from(View view, Map<String, API> apis, YamlMap map) {
if (!apis.containsKey(map['api'])) {
throw Exception('api with name=' + map['api'] + ' not define');
}
API api = apis[map['api']]!;
Map<String, String>? paramMetaValues = HashMap();
if (map.containsKey('parameters')) {
map['parameters'].forEach((k, v) {
paramMetaValues[k.toString()] = v.toString();
});
}
return APIHandler(api, paramMetaValues, map['success'], map['error']);
}