handleMethod function
Implementation
void handleMethod(
String? channelTag, String method, Map<String, dynamic> values) {
if (channelTag == null) {
final transformer = transformMap[method];
if (transformer == null) {
print("Transformer not found for: $method");
return;
}
return transformer(values);
} else {
if (_handleSubChannelStatsCallback(method, channelTag, values)) {
return;
}
final sink_ = sub_channel_sinks[channelTag];
if (sink_ == null) {
print("Channel sink not found for: $channelTag");
return;
}
final transformer = channelTransFormMap[method];
if (transformer == null) {
print("Channel transformer not found for: $method");
return;
}
return transformer(sink_, values);
}
}