|
|
|
|
@ -159,19 +159,12 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Container(
|
|
|
|
|
bool isPortrait = MediaQuery.of(context).orientation == Orientation.portrait;
|
|
|
|
|
|
|
|
|
|
Widget _header = SizedBox(
|
|
|
|
|
height: isPortrait ? null : double.infinity,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: _ayatTangheemTypeMappedFirstData == null
|
|
|
|
|
? SizedBox()
|
|
|
|
|
: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.only(bottom: 16),
|
|
|
|
|
children: [
|
|
|
|
|
CommonHeader(_ayatTangheemTypeMappedFirstData.tangheemTypeName ?? "", "assets/icons/new/quran_bg.jpg", Color(0xffAE8646),
|
|
|
|
|
child: CommonHeader(_ayatTangheemTypeMappedFirstData.tangheemTypeName ?? "", "assets/icons/new/quran_bg.jpg", Color(0xffAE8646),
|
|
|
|
|
isCustom: true, message: _ayatTangheemTypeMappedFirstData.tangheemTypeDescription ?? "", onTap: (headerEnum) {
|
|
|
|
|
if (headerEnum == CommonHeaderEnum.ShareAsText) {
|
|
|
|
|
_shareAyaAsLink();
|
|
|
|
|
@ -195,7 +188,9 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Widget _dataListView = SingleChildScrollView(
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
child: RepaintBoundary(
|
|
|
|
|
key: _globalKey,
|
|
|
|
|
@ -204,7 +199,7 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.all(0),
|
|
|
|
|
padding: EdgeInsets.only(top: 24, bottom: 24),
|
|
|
|
|
itemCount: ayatTangheemTypeMappedDataList.length > 5 ? 5 : ayatTangheemTypeMappedDataList.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
final _ayatTangheemTypeMappedData = ayatTangheemTypeMappedDataList[index];
|
|
|
|
|
@ -351,13 +346,9 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
|
|
|
|
var removedData = list[index];
|
|
|
|
|
list.remove(removedData);
|
|
|
|
|
list.insert(0, removedData);
|
|
|
|
|
list = list
|
|
|
|
|
?.where((element) => (element.ayahNos.contains(removedData.ayahNos)) && (element.tangheemTypeId == removedData.tangheemTypeId))
|
|
|
|
|
?.toList() ??
|
|
|
|
|
[];
|
|
|
|
|
list = list?.where((element) => (element.ayahNos.contains(removedData.ayahNos)) && (element.tangheemTypeId == removedData.tangheemTypeId))?.toList() ?? [];
|
|
|
|
|
|
|
|
|
|
TangheemDetailParams tangheem =
|
|
|
|
|
TangheemDetailParams(selectedTangheemTypeId: _dataList[index].ayaTangheemTypeId, ayatTangheemTypeMappedDataList: list);
|
|
|
|
|
TangheemDetailParams tangheem = TangheemDetailParams(selectedTangheemTypeId: _dataList[index].ayaTangheemTypeId, ayatTangheemTypeMappedDataList: list);
|
|
|
|
|
Navigator.pushNamed(context, TangheemDetailScreen.routeName, arguments: tangheem);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
@ -389,8 +380,7 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Widget aboveInnerBelowMerge = Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white, borderRadius: BorderRadius.circular(20), boxShadow: [BoxShadow(color: ColorConsts.greyE0Color, offset: Offset(0.0, 1.0), blurRadius: 0)]
|
|
|
|
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20), boxShadow: [BoxShadow(color: ColorConsts.greyE0Color, offset: Offset(0.0, 1.0), blurRadius: 0)]
|
|
|
|
|
// border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -404,8 +394,8 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
|
|
|
|
padding: EdgeInsets.only(top: 21, bottom: 21, left: 24, right: 24),
|
|
|
|
|
children: [
|
|
|
|
|
" جملة ${_ayatTangheemTypeMappedData.tangheemTypeName} $_tempTangheemIndexWord".toText(22, color: ColorConsts.darkText, textAlign: TextAlign.center, height: 22),
|
|
|
|
|
|
|
|
|
|
12.height,Row(
|
|
|
|
|
12.height,
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
@ -451,9 +441,8 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// if (MediaQuery.of(context).orientation == Orientation.portrait)
|
|
|
|
|
AyaPlayerWidget(
|
|
|
|
|
);
|
|
|
|
|
Widget _ayaPlayer = AyaPlayerWidget(
|
|
|
|
|
surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "",
|
|
|
|
|
ayaTangheemTypeId: _ayatTangheemTypeMappedFirstData?.tangheemTypeId ?? "",
|
|
|
|
|
globalKey: _globalKey,
|
|
|
|
|
@ -461,53 +450,43 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
|
|
|
|
ayaNo: _ayatTangheemTypeMappedFirstData?.ayahNo,
|
|
|
|
|
surahNo: _ayatTangheemTypeMappedFirstData?.surahNo,
|
|
|
|
|
voiceNoteList: voiceNoteList)
|
|
|
|
|
.paddingOnly(left: 24, right: 24),
|
|
|
|
|
.paddingOnly(left: 24, right: 24);
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: _ayatTangheemTypeMappedFirstData == null
|
|
|
|
|
? SizedBox()
|
|
|
|
|
: isPortrait
|
|
|
|
|
? ListView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.only(bottom: 16),
|
|
|
|
|
children: [
|
|
|
|
|
_header,
|
|
|
|
|
_dataListView,
|
|
|
|
|
_ayaPlayer,
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
AyaRecordWidget().paddingOnly(left: 24, right: 24),
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
discussionView(_discussionModel?.data ?? []).paddingOnly(left: 24, right: 24),
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (false)
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
)
|
|
|
|
|
: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 24,
|
|
|
|
|
margin: EdgeInsets.only(bottom: 8, top: 8),
|
|
|
|
|
// color: Colors.transparent,
|
|
|
|
|
child: TextButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
showAyaPlayer = !showAyaPlayer;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
showAyaPlayer ? "إخفاء التسجيلات" : "إظهار التسجيلات",
|
|
|
|
|
style: TextStyle(color: Colors.black87, fontSize: 12),
|
|
|
|
|
),
|
|
|
|
|
style: TextButton.styleFrom(
|
|
|
|
|
backgroundColor: ColorConsts.gradientOrange,
|
|
|
|
|
foregroundColor: ColorConsts.primaryBlue,
|
|
|
|
|
padding: EdgeInsets.only(top: 4, bottom: 4, right: 8, left: 8),
|
|
|
|
|
textStyle: TextStyle(color: Colors.white, fontSize: 12),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (showAyaPlayer)
|
|
|
|
|
AyaPlayerWidget(
|
|
|
|
|
surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "",
|
|
|
|
|
ayaTangheemTypeId: _ayatTangheemTypeMappedFirstData?.tangheemTypeId ?? "",
|
|
|
|
|
ayaNo: _ayatTangheemTypeMappedFirstData?.ayahNo,
|
|
|
|
|
numberInSurah: _ayatTangheemTypeMappedFirstData?.ayatNumberInSurahs,
|
|
|
|
|
surahNo: _ayatTangheemTypeMappedFirstData?.surahNo,
|
|
|
|
|
globalKey: _globalKey,
|
|
|
|
|
voiceNoteList: voiceNoteList),
|
|
|
|
|
Expanded(child: _header, flex: 4),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
_dataListView,
|
|
|
|
|
_ayaPlayer,
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
AyaRecordWidget().paddingOnly(left: 24, right: 24),
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
discussionView(_discussionModel?.data ?? []).paddingOnly(left: 24, right: 24),
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
flex: 6),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|