From 600804743972eaff6992f372f874be77e41eb9ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Apr 2026 04:51:38 +0000 Subject: [PATCH 1/2] Initial plan From 336284f0033e9ba1fd0a7b197bcdaddab177d86e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Apr 2026 04:56:10 +0000 Subject: [PATCH 2/2] fix: keep basmala below fullscreen toolbar on swipe Agent-Logs-Url: https://github.com/ariful19/QuranReader/sessions/b3c81dff-867c-4cca-8a38-48f66e1343d1 Co-authored-by: ariful19 <20966323+ariful19@users.noreply.github.com> --- lib/src/reader_page.dart | 3 ++- test/widget_test.dart | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/lib/src/reader_page.dart b/lib/src/reader_page.dart index 3e008d5..9e429e5 100644 --- a/lib/src/reader_page.dart +++ b/lib/src/reader_page.dart @@ -495,7 +495,8 @@ class _SurahReaderPageState extends State { child: Stack( children: [ SafeArea( - top: false, + left: false, + right: false, bottom: false, child: Padding( padding: const EdgeInsets.fromLTRB(8, 8, 8, 20), diff --git a/test/widget_test.dart b/test/widget_test.dart index c26e600..b912408 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -413,6 +413,53 @@ void main() { expect(find.text('The Cow'), findsOneWidget); }); + testWidgets( + 'reader swipe keeps the basmala below the toolbar without saved progress', + (tester) async { + tester.view.physicalSize = const Size(400, 700); + tester.view.devicePixelRatio = 1.0; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + + final controller = QuranAppController( + catalogSource: _FakeCatalogSource(), + appStateStore: _MemoryStateStore(), + ); + await controller.load(); + + await tester.pumpWidget( + MaterialApp( + theme: ThemeData(useMaterial3: true), + home: MediaQuery( + data: const MediaQueryData( + padding: EdgeInsets.only(top: 32), + viewPadding: EdgeInsets.only(top: 32), + ), + child: SurahReaderPage( + controller: controller, + surahIndex: 1, + ), + ), + ), + ); + await tester.pumpAndSettle(); + + await tester.drag( + find.byKey(const Key('reader-swipe-area')), + const Offset(220, 0), + ); + await tester.pumpAndSettle(); + + final basmalaRect = tester.getRect( + find.byKey(const Key('reader-basmala-header')), + ); + final progressButtonRect = tester.getRect( + find.byKey(const Key('reader-progress-button')), + ); + + expect(basmalaRect.top, greaterThan(progressButtonRect.bottom)); + }); + testWidgets('reader swipe right to left opens the previous surah', (tester) async { tester.view.physicalSize = const Size(400, 700);