+
This commit is contained in:
parent
a5e0185423
commit
281e621da3
2 changed files with 13 additions and 1 deletions
|
|
@ -39,6 +39,18 @@ console.log = function (message) {
|
|||
}
|
||||
sendMessage("log", JSON.stringify([message.toString()]));
|
||||
};
|
||||
console.warn = function (message) {
|
||||
if (typeof message === "object") {
|
||||
message = JSON.stringify(message);
|
||||
}
|
||||
sendMessage("log", JSON.stringify([message.toString()]));
|
||||
};
|
||||
console.error = function (message) {
|
||||
if (typeof message === "object") {
|
||||
message = JSON.stringify(message);
|
||||
}
|
||||
sendMessage("log", JSON.stringify([message.toString()]));
|
||||
};
|
||||
String.prototype.substringAfter = function(pattern) {
|
||||
const startIndex = this.indexOf(pattern);
|
||||
if (startIndex === -1) return this.substring(0);
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ class _CodeEditorState extends ConsumerState<CodeEditor> {
|
|||
final value = logs[index];
|
||||
return SelectableText(value.$2,
|
||||
style: TextStyle(
|
||||
color: value.$1 == LoggerLevel.warning
|
||||
color: value.$1 == LoggerLevel.info
|
||||
? Colors.yellow
|
||||
: Colors.blueAccent));
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue