From 94c077a4fe46abd6bece15a854b8f6a3972a7e76 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Tue, 24 Dec 2024 11:17:08 +0800 Subject: [PATCH] mod: long press to clear logs avoid being unable to clear logs when stuck in logspage Signed-off-by: bggRGjQaUbCoE --- lib/pages/about/index.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart index f63d24cb..e6c0b521 100644 --- a/lib/pages/about/index.dart +++ b/lib/pages/about/index.dart @@ -1,3 +1,4 @@ +import 'package:PiliPalaX/services/loggeer.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; @@ -167,6 +168,9 @@ class _AboutPageState extends State { onTap: () { Get.toNamed('/logs'); }, + onLongPress: () { + clearLogs(); + }, leading: const Icon(Icons.bug_report_outlined), title: const Text('错误日志'), trailing: Icon(Icons.arrow_forward, size: 16, color: outline),