onConsoleMessage method
Implementation
void onConsoleMessage(String type, String? message) async {
int messageLevel = 1;
switch (type) {
case 'debug':
messageLevel = 0;
break;
case 'error':
messageLevel = 3;
break;
case 'warn':
messageLevel = 2;
break;
case 'info':
case 'log':
default:
messageLevel = 1;
}
var obj = {"messageLevel": messageLevel, "message": message};
await _channel?.invokeMethod("onConsoleMessage", obj);
}