You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tangheem/lib/ui/surah_screen.dart

169 lines
8.9 KiB
Dart

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:tangheem/classes/const.dart';
import 'package:tangheem/widgets/aya_player_widget.dart';
import 'package:tangheem/widgets/common_dropdown_button.dart';
class SurahScreen extends StatefulWidget {
static const String routeName = "/surah";
final String query;
SurahScreen({Key key, @required this.query}) : super(key: key);
@override
_SurahScreenState createState() {
return _SurahScreenState();
}
}
class _SurahScreenState extends State<SurahScreen> {
@override
void initState() {
super.initState();
searchQuery();
}
void searchQuery() {}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.fromLTRB(16, 24, 16, 0),
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"اقرأ القرآن الكريم",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20, color: Const.primaryBlue, height: 1),
),
SizedBox(height: 16),
Row(
children: [
Expanded(
child: CommonDropDownButton("سورة البقرة", onPressed: () {}),
),
SizedBox(width: 4),
Expanded(
child: CommonDropDownButton("من الاية" + " 158", onPressed: () {}),
),
SizedBox(width: 4),
Expanded(
child: CommonDropDownButton("الى الاية" + " 123", onPressed: () {}),
),
],
),
SizedBox(height: 16),
Expanded(
child: Container(
margin: EdgeInsets.only(top: 4, bottom: 4),
padding: EdgeInsets.only(top: 16, bottom: 4, right: 16, left: 16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
nextOptionButton("assets/icons/go_forward.svg", "سورة الفاتحة", () {}),
previousOptionButton("assets/icons/go_forward.svg", "سورة آل عمران", () {}),
],
),
Expanded(
child: ListView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 16, bottom: 8),
children: [
Text(
"بسم الله الرحمن الرحيم",
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20, color: Const.primaryBlue, height: 1),
),
SizedBox(height: 8),
Container(
padding: EdgeInsets.only(left: 4, right: 4),
child: Text(
"إِنَّ الصَّفَا وَالْمَرْوَةَ مِنْ شَعَائِرِ اللَّهِ ۖ فَمَنْ حَجَّ الْبَيْتَ أَوِ اعْتَمَرَ فَلَا جُنَاحَ عَلَيْهِ أَنْ يَطَّوَّفَ بِهِمَا ۚ وَمَنْ تَطَوَّعَ خَيْرًا فَإِنَّ اللَّهَ شَاكِرٌ عَلِيمٌ ﴿158 إِنَّ الَّذِينَ يَكْتُمُونَ مَا أَنْزَلْنَا مِنَ الْبَيِّنَاتِ وَالْهُدَىٰ مِنْ بَعْدِ مَا بَيَّنَّاهُ لِلنَّاسِ فِي الْكِتَابِ ۙ أُولَٰئِكَ يَلْعَنُهُمُ اللَّهُ وَيَلْعَنُهُمُ اللَّاعِنُونَ ﴿159 إِلَّا الَّذِينَ تَابُوا وَأَصْلَحُوا وَبَيَّنُوا فَأُولَٰئِكَ أَتُوبُ عَلَيْهِمْ ۚ وَأَنَا التَّوَّابُ الرَّحِيمُ ﴿160 إِنَّ الَّذِينَ كَفَرُوا وَمَاتُوا وَهُمْ كُفَّارٌ أُولَٰئِكَ عَلَيْهِمْ لَعْنَةُ اللَّهِ وَالْمَلَائِكَةِ وَالنَّاسِ أَجْمَعِينَ ﴿161 خَالِدِينَ فِيهَا ۖ لَا يُخَفَّفُ عَنْهُمُ الْعَذَابُ وَلَا هُمْ يُنْظَرُونَ ﴿162 وَإِلَٰهُكُمْ إِلَٰهٌ وَاحِدٌ ۖ لَا إِلَٰهَ إِلَّا هُوَ الرَّحْمَٰنُ الرَّحِيمُ ﴿163إِنَّ فِي خَلْقِ السَّمَاوَاتِ وَالْأَرْضِ وَاخْتِلَافِ اللَّيْلِ وَالنَّهَارِ وَالْفُلْكِ الَّتِي تَجْرِي فِي الْبَحْرِ بِمَا يَنْفَعُ النَّاسَ وَمَا أَنْزَلَ اللَّهُ مِنَ السَّمَاءِ مِنْ مَاءٍ فَأَحْيَا بِهِ الْأَرْضَ بَعْدَ مَوْتِهَا وَبَثَّ فِيهَا مِنْ كُلِّ دَابَّةٍ وَتَصْرِيفِ الرِّيَاحِ وَالسَّحَابِ الْمُسَخَّرِ بَيْنَ السَّمَاءِ وَالْأَرْضِ لَآيَاتٍ لِقَوْمٍ يَعْقِلُونَ ﴿164 وَمِنَ النَّاسِ مَنْ يَتَّخِذُ مِنْ دُونِ اللَّهِ أَنْدَادًا يُحِبُّونَهُمْ كَحُبِّ اللَّهِ ۖ وَالَّذِينَ آمَنُوا أَشَدُّ حُبًّا لِلَّهِ ۗ وَلَوْ يَرَى الَّذِينَ ظَلَمُوا إِذْ يَرَوْنَ الْعَذَابَ أَنَّ الْقُوَّةَ لِلَّهِ جَمِيعًا وَأَنَّ اللَّهَ شَدِيدُ الْعَذَابِ ﴿165 إِذْ تَبَرَّأَ الَّذِينَ اتُّبِعُوا مِنَ الَّذِينَ اتَّبَعُوا وَرَأَوُا الْعَذَابَ وَتَقَطَّعَتْ بِهِمُ الْأَسْبَابُ ﴿166 وَقَالَ الَّذِينَ اتَّبَعُوا لَوْ أَنَّ لَنَا كَرَّةً فَنَتَبَرَّأَ مِنْهُمْ كَمَا تَبَرَّءُوا مِنَّا ۗ كَذَٰلِكَ يُرِيهِمُ اللَّهُ أَعْمَالَهُمْ حَسَرَاتٍ عَلَيْهِمْ ۖ وَمَا هُمْ بِخَارِجِينَ مِنَ النَّارِ ﴿1674",
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "UthmanicHafs",
color: Const.primaryBlue,
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
),
],
),
),
SizedBox(height: 8),
Text(
"1 2 3 4 5 6 7 8 9",
style: TextStyle(fontSize: 14, color: Const.textHintGrey),
),
SizedBox(height: 4),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
nextOptionButton("assets/icons/go_forward.svg", "الآيات السابقة", () {}),
previousOptionButton("assets/icons/go_forward.svg", "الآيات التالية", () {}),
],
),
],
),
),
),
AyaPlayerWidget()
],
),
);
}
Widget nextOptionButton(String icon, String text, VoidCallback onPressed) {
return InkWell(
onTap: onPressed,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset(icon, height: 16, width: 16, color: Const.secondaryOrange),
SizedBox(width: 4),
Text(
text,
style: TextStyle(color: Const.textGrey),
),
],
),
);
}
Widget previousOptionButton(String icon, String text, VoidCallback onPressed) {
return InkWell(
onTap: onPressed,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Text(
text,
style: TextStyle(color: Const.textGrey),
),
SizedBox(width: 4),
SvgPicture.asset(icon, height: 16, width: 16, color: Const.secondaryOrange),
],
),
);
}
}