e method
Log a message at level Level.error
.
Implementation
@override
void e(message, [error, StackTrace? stackTrace]) {
// if (level.index >= leisim.Level.error.index && kDebugMode) {
List<String> stackTraceLine = '${StackTrace.current}'
.split('\n')
.where((line) => line.length > 2)
.map((line) => line.substring(1).replaceAll(RegExp(r'^([0-9])+'), '').trim())
.takeWhile((line) => !line.contains('package:flutter'))
.skip(1)
.toList();
String stackTrace = stackTraceLine.map((line) => ' $line').join('\n');
_printMultiLine(red('\n'
'=== ERROR =============================='
'\n'
'[e] $message'
'\n'
' $stackTrace'
'\n'));
// }
}