mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-27 11:38:40 +00:00
opt log page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -12,6 +12,7 @@ import 'package:PiliPlus/utils/storage_key.dart';
|
|||||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:catcher_2/model/platform_type.dart';
|
import 'package:catcher_2/model/platform_type.dart';
|
||||||
|
import 'package:catcher_2/model/report.dart' as catcher;
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
@@ -64,6 +65,7 @@ class _LogsPageState extends State<LogsPage> {
|
|||||||
const {},
|
const {},
|
||||||
null,
|
null,
|
||||||
PlatformType.unknown,
|
PlatformType.unknown,
|
||||||
|
null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}).toList();
|
}).toList();
|
||||||
@@ -125,6 +127,7 @@ class _LogsPageState extends State<LogsPage> {
|
|||||||
PageUtils.launchURL('${Constants.sourceCodeUrl}/issues');
|
PageUtils.launchURL('${Constants.sourceCodeUrl}/issues');
|
||||||
break;
|
break;
|
||||||
case 'clear':
|
case 'clear':
|
||||||
|
latestLog = null;
|
||||||
clearLogsHandle();
|
clearLogsHandle();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -446,34 +449,19 @@ Widget _card(List<Widget> contents) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Report {
|
class Report extends catcher.Report {
|
||||||
Report(
|
Report(
|
||||||
this.error,
|
super.error,
|
||||||
this.stackTrace,
|
super.stackTrace,
|
||||||
this.dateTime,
|
super.dateTime,
|
||||||
this.deviceParameters,
|
super.deviceParameters,
|
||||||
this.applicationParameters,
|
super.applicationParameters,
|
||||||
this.customParameters,
|
super.customParameters,
|
||||||
this.errorDetails,
|
super.errorDetails,
|
||||||
this.platformType,
|
super.platformType,
|
||||||
|
super.screenshot,
|
||||||
);
|
);
|
||||||
|
|
||||||
final dynamic error;
|
|
||||||
|
|
||||||
final dynamic stackTrace;
|
|
||||||
|
|
||||||
final DateTime dateTime;
|
|
||||||
|
|
||||||
final Map<String, dynamic> deviceParameters;
|
|
||||||
|
|
||||||
final Map<String, dynamic> applicationParameters;
|
|
||||||
|
|
||||||
final Map<String, dynamic> customParameters;
|
|
||||||
|
|
||||||
final FlutterErrorDetails? errorDetails;
|
|
||||||
|
|
||||||
final PlatformType platformType;
|
|
||||||
|
|
||||||
bool isExpanded = false;
|
bool isExpanded = false;
|
||||||
|
|
||||||
factory Report.fromJson(Map<String, dynamic> json) => Report(
|
factory Report.fromJson(Map<String, dynamic> json) => Report(
|
||||||
@@ -485,6 +473,7 @@ class Report {
|
|||||||
json['customParameters'] ?? const {},
|
json['customParameters'] ?? const {},
|
||||||
null,
|
null,
|
||||||
PlatformType.values.byName(json['platformType']),
|
PlatformType.values.byName(json['platformType']),
|
||||||
|
null,
|
||||||
);
|
);
|
||||||
|
|
||||||
Report copyWith({
|
Report copyWith({
|
||||||
@@ -506,6 +495,7 @@ class Report {
|
|||||||
customParameters ?? this.customParameters,
|
customParameters ?? this.customParameters,
|
||||||
errorDetails ?? this.errorDetails,
|
errorDetails ?? this.errorDetails,
|
||||||
platformType ?? this.platformType,
|
platformType ?? this.platformType,
|
||||||
|
null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user