|
|
|
|
@ -107,19 +107,19 @@ class _QuranScreenState extends State<QuranScreen> {
|
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
try {
|
|
|
|
|
_ayaModel = await TangheemUserApiClient().getAyaByFilter(_selectedSurah + 1, _fromAyaList[_selectedFromAya], _toAyaList[_selectedToAya]);
|
|
|
|
|
setState(() {});
|
|
|
|
|
//setState(() {});
|
|
|
|
|
} catch (ex, tr) {
|
|
|
|
|
Utils.handleException(ex, null);
|
|
|
|
|
} finally {
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
}
|
|
|
|
|
getTangheemBySurahId();
|
|
|
|
|
scrollToId.animateTo("$_currentPage", duration: Duration(milliseconds: 300), curve: Curves.ease);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void getQuranByPageNo() async {
|
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
try {
|
|
|
|
|
// _currentPage = 603;
|
|
|
|
|
_ayaModel = await TangheemUserApiClient().getQuranByPageNo(_currentPage);
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
setState(() {});
|
|
|
|
|
@ -181,7 +181,7 @@ class _QuranScreenState extends State<QuranScreen> {
|
|
|
|
|
String _surahAya = "";
|
|
|
|
|
|
|
|
|
|
_ayaModel?.data?.forEach((element) {
|
|
|
|
|
var temp = element.numberInSurah == 1 ? getBismillahWithSurahName(element.surahNameAR, element.surahID != 1, _surahAya.length <= 1) + element.ayahText : element.ayahText;
|
|
|
|
|
var temp = element.numberInSurah == 1 ? getBismillahWithSurahName(element.surahNameAR, element.surahID != 1, _surahAya.length <= 1) + element.reverseAyatNumber() : element.reverseAyatNumber();
|
|
|
|
|
_surahAya = _surahAya + temp;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -312,35 +312,37 @@ class _QuranScreenState extends State<QuranScreen> {
|
|
|
|
|
// SizedBox(height: 8),
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 4, right: 4),
|
|
|
|
|
child: Text(
|
|
|
|
|
_surahAya,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontFamily: "UthmanicHafs",
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
color: ColorConsts.primaryBlue,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// todo "sikander" : lines commented for future
|
|
|
|
|
// TextHighLightWidget(
|
|
|
|
|
// text: _surahAya,
|
|
|
|
|
// valueColor: ColorConsts.primaryBlue,
|
|
|
|
|
// highlights: _tangheemWords,
|
|
|
|
|
// onTap: (value) {
|
|
|
|
|
// List<AyatTangheemTypeMappedData> _ayatList = _ayatTangheemTypeMapped.data?.where((element) => element.highlightText == value)?.toList() ?? [];
|
|
|
|
|
// if (_ayatList.length > 1) {
|
|
|
|
|
// _selectTangheemType(_ayatList);
|
|
|
|
|
// } else {
|
|
|
|
|
// Navigator.pushNamed(context, TangheemDetailScreen.routeName, arguments: _ayatList.first);
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
child:
|
|
|
|
|
|
|
|
|
|
// Text(
|
|
|
|
|
// _surahAya,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontFamily: "UthmanicHafs",
|
|
|
|
|
// fontSize: 18,
|
|
|
|
|
// color: ColorConsts.primaryBlue,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// todo "sikander" : lines commented for future
|
|
|
|
|
TextHighLightWidget(
|
|
|
|
|
text: _surahAya,
|
|
|
|
|
valueColor: ColorConsts.primaryBlue,
|
|
|
|
|
highlights: _tangheemWords,
|
|
|
|
|
onTap: (value) {
|
|
|
|
|
List<AyatTangheemTypeMappedData> _ayatList = _ayatTangheemTypeMapped.data?.where((element) => element.highlightText == value)?.toList() ?? [];
|
|
|
|
|
if (_ayatList.length > 1) {
|
|
|
|
|
_selectTangheemType(_ayatList);
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.pushNamed(context, TangheemDetailScreen.routeName, arguments: _ayatList.first);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontFamily: "UthmanicHafs",
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|