execute method
Synchronously execute td function Handled by native td execute function
Implementation
Future<Map<String, dynamic>> execute(Map<String, dynamic> obj) async {
if (beforeExecute != null) {
beforeExecute!(obj);
}
Map<String, dynamic> r = _client.execute(obj);
if (afterExecute != null) {
afterExecute!(r);
}
if (r['@type'] == 'error') {
Error e = Error.fromJson(r);
_handleError(e);
return Future.error(e);
}
return Future.value(r);
}