Skip to content

Commit

Permalink
feat: add show surah by the merge
Browse files Browse the repository at this point in the history
  • Loading branch information
YassinNouh21 committed Oct 14, 2024
1 parent 4163b30 commit 5c2876a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lib/src/pages/quran/page/quran_reading_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:mawaqit/i18n/l10n.dart';
import 'package:mawaqit/src/pages/quran/page/reciter_selection_screen.dart';
import 'package:mawaqit/src/pages/quran/widget/reading/quran_reading_widgets.dart';
import 'package:mawaqit/src/pages/quran/widget/reading/quran_surah_selector.dart';

import 'package:mawaqit/src/services/user_preferences_manager.dart';
import 'package:mawaqit/src/state_management/quran/download_quran/download_quran_notifier.dart';
Expand Down Expand Up @@ -189,12 +190,47 @@ class _QuranReadingScreenState extends ConsumerState<QuranReadingScreen> {
_isThereCurrentDialogShowing(context)),
buildBackButton(
isPortrait, userPrefs, context, isPortrait ? _portraitModeBackButtonFocusNode : _backButtonFocusNode),
isPortrait ? Container() : buildShowSurah(quranReadingState),
],
);
},
);
}

Align buildShowSurah(QuranReadingState quranReadingState) {
return Align(
alignment: Alignment.topCenter,
child: Padding(
padding: EdgeInsets.only(top: 0.5.h),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
ref.read(quranReadingNotifierProvider.notifier).getAllSuwarPage();
showSurahSelector(context, quranReadingState.currentPage);
},
borderRadius: BorderRadius.circular(20),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.4),
borderRadius: BorderRadius.circular(20),
),
child: Text(
quranReadingState.currentSurahName,
style: TextStyle(
color: Colors.white,
fontSize: 8.sp,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
);
}

Widget buildFloatingPortrait(bool isPortrait, UserPreferencesManager userPrefs, BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
Expand Down

0 comments on commit 5c2876a

Please sign in to comment.