mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 19:18:43 +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/utils.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/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
@@ -64,6 +65,7 @@ class _LogsPageState extends State<LogsPage> {
|
||||
const {},
|
||||
null,
|
||||
PlatformType.unknown,
|
||||
null,
|
||||
);
|
||||
}
|
||||
}).toList();
|
||||
@@ -125,6 +127,7 @@ class _LogsPageState extends State<LogsPage> {
|
||||
PageUtils.launchURL('${Constants.sourceCodeUrl}/issues');
|
||||
break;
|
||||
case 'clear':
|
||||
latestLog = null;
|
||||
clearLogsHandle();
|
||||
break;
|
||||
default:
|
||||
@@ -446,34 +449,19 @@ Widget _card(List<Widget> contents) {
|
||||
);
|
||||
}
|
||||
|
||||
class Report {
|
||||
class Report extends catcher.Report {
|
||||
Report(
|
||||
this.error,
|
||||
this.stackTrace,
|
||||
this.dateTime,
|
||||
this.deviceParameters,
|
||||
this.applicationParameters,
|
||||
this.customParameters,
|
||||
this.errorDetails,
|
||||
this.platformType,
|
||||
super.error,
|
||||
super.stackTrace,
|
||||
super.dateTime,
|
||||
super.deviceParameters,
|
||||
super.applicationParameters,
|
||||
super.customParameters,
|
||||
super.errorDetails,
|
||||
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;
|
||||
|
||||
factory Report.fromJson(Map<String, dynamic> json) => Report(
|
||||
@@ -485,6 +473,7 @@ class Report {
|
||||
json['customParameters'] ?? const {},
|
||||
null,
|
||||
PlatformType.values.byName(json['platformType']),
|
||||
null,
|
||||
);
|
||||
|
||||
Report copyWith({
|
||||
@@ -506,6 +495,7 @@ class Report {
|
||||
customParameters ?? this.customParameters,
|
||||
errorDetails ?? this.errorDetails,
|
||||
platformType ?? this.platformType,
|
||||
null,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user