From e616893ad2fcfa619abaec9cd24850d5a5df6e75 Mon Sep 17 00:00:00 2001 From: Armand <4831c0@proton.me> Date: Tue, 16 Sep 2025 21:29:32 +0200 Subject: [PATCH] debug: update throw exception use a nested isar txn, which can trigger the error popup --- firka/lib/ui/phone/screens/debug/debug_screen.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/firka/lib/ui/phone/screens/debug/debug_screen.dart b/firka/lib/ui/phone/screens/debug/debug_screen.dart index 6dfaef6f..49d8f494 100644 --- a/firka/lib/ui/phone/screens/debug/debug_screen.dart +++ b/firka/lib/ui/phone/screens/debug/debug_screen.dart @@ -130,8 +130,10 @@ class _DebugScreen extends FirkaState { ), const SizedBox(height: 20), ElevatedButton( - onPressed: () { - throw 0 / 0; + onPressed: () async { + await widget.data.isar.writeTxn(() async { + await widget.data.isar.writeTxn(() async {}); + }); }, child: const Text('Throw Exception'), ),