getChannelVar method
dynamic
getChannelVar(
- dynamic callback(
- bool,
- dynamic
),
- String variable
)
Implementation
getChannelVar(Function(bool, dynamic) callback, String variable) {
var resp = ChannelsApi.getChannelVariable(id, variable);
resp.then((value) {
print("Channel variable: ${value.resp}");
//var varJson = jsonDecode(value.resp);
//throw "You need to see cahnnel Variable";
if (value.resp == '{"message":"Provided variable was not found"}') {
callback(true, value.resp);
} else {
//callback(false, value.resp);
throw value.resp;
}
});
}