summaryrefslogtreecommitdiff
path: root/lib/widgets/debug/report.dart
diff options
context:
space:
mode:
authormirror <mirror@localhost>2026-11-22 08:41:00 +0900
committermirror <mirror@localhost>2026-11-22 08:41:00 +0900
commit449d8b74bd6d9dae98a07254cdfad677b920e7b0 (patch)
treec131c3528c4d517f56e19b854a7453fedb097d40 /lib/widgets/debug/report.dart
downloadaves-src-master.tar.gz
aves-src-master.zip
snapshot of aves v1.13.12 (secrets removed: android/app/google-services.json)HEADv1.13.12master
Diffstat (limited to 'lib/widgets/debug/report.dart')
-rw-r--r--lib/widgets/debug/report.dart69
1 files changed, 69 insertions, 0 deletions
diff --git a/lib/widgets/debug/report.dart b/lib/widgets/debug/report.dart
new file mode 100644
index 0000000..4a7e72d
--- /dev/null
+++ b/lib/widgets/debug/report.dart
@@ -0,0 +1,69 @@
+import 'package:aves/services/android_debug_service.dart';
+import 'package:aves/services/common/services.dart';
+import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
+import 'package:aves/widgets/viewer/info/common.dart';
+import 'package:flutter/material.dart';
+
+class DebugErrorReportingSection extends StatefulWidget {
+ const DebugErrorReportingSection({super.key});
+
+ @override
+ State<DebugErrorReportingSection> createState() => _DebugErrorReportingSectionState();
+}
+
+class _DebugErrorReportingSectionState extends State<DebugErrorReportingSection> with AutomaticKeepAliveClientMixin {
+ @override
+ Widget build(BuildContext context) {
+ super.build(context);
+
+ return AvesExpansionTile(
+ title: 'Reporting',
+ children: [
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: ElevatedButton(
+ onPressed: AndroidDebugService.crash,
+ child: Text('Crash'),
+ ),
+ ),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: ElevatedButton(
+ onPressed: AndroidDebugService.exception,
+ child: Text('Throw exception'),
+ ),
+ ),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: ElevatedButton(
+ onPressed: AndroidDebugService.safeException,
+ child: Text('Throw exception (safe)'),
+ ),
+ ),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: ElevatedButton(
+ onPressed: AndroidDebugService.exceptionInCoroutine,
+ child: Text('Throw exception in coroutine'),
+ ),
+ ),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: ElevatedButton(
+ onPressed: AndroidDebugService.safeExceptionInCoroutine,
+ child: Text('Throw exception in coroutine (safe)'),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.only(left: 8, right: 8, bottom: 8),
+ child: InfoRowGroup(
+ info: reportService.state,
+ ),
+ )
+ ],
+ );
+ }
+
+ @override
+ bool get wantKeepAlive => true;
+}