feature: Details screen rework (#190)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-12-27 15:21:47 +01:00 committed by GitHub
parent 473e817e0f
commit d2138da785
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 462 additions and 394 deletions

View file

@ -88,7 +88,7 @@ class CrashLogNotifier extends StateNotifier<List<ErrorViewModel>> {
if (kDebugMode) {
print('${rec.level.name}: ${rec.time}: ${rec.message}');
}
if (rec.level != Level.INFO) {
if (rec.level > Level.INFO) {
state = [ErrorViewModel(rec: rec), ...state];
if (state.length >= maxLength) {
state = state.sublist(0, maxLength);
@ -97,7 +97,7 @@ class CrashLogNotifier extends StateNotifier<List<ErrorViewModel>> {
}
void logFile(FlutterErrorDetails details) {
logger.severe('Flutter error: ${details.exception}', details.exception, details.stack!);
logger.severe('Flutter error: ${details.exception}', details.exception, details.stack);
if (details.stack != null && kDebugMode) {
print('${details.stack}');