|
|
|
|
@ -159,357 +159,336 @@ 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),
|
|
|
|
|
isCustom: true, message: _ayatTangheemTypeMappedFirstData.tangheemTypeDescription ?? "", onTap: (headerEnum) {
|
|
|
|
|
if (headerEnum == CommonHeaderEnum.ShareAsText) {
|
|
|
|
|
_shareAyaAsLink();
|
|
|
|
|
} else if (headerEnum == CommonHeaderEnum.ShareAsImage) {
|
|
|
|
|
_shareAyaAsImage();
|
|
|
|
|
} else if (headerEnum == CommonHeaderEnum.ZoomOut) {
|
|
|
|
|
if (fontSize <= 12) {
|
|
|
|
|
Utils.showToast("وصل حجم الخط إلى الحد الأدنى للحجم");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
fontSize -= 2;
|
|
|
|
|
prefs.setInt(GlobalConsts.fontZoomSize, fontSize);
|
|
|
|
|
setState(() {});
|
|
|
|
|
} else if (headerEnum == CommonHeaderEnum.ZoomIn) {
|
|
|
|
|
if (fontSize >= 36) {
|
|
|
|
|
Utils.showToast("وصل حجم الخط إلى الحد الأقصى للحجم");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
fontSize += 2;
|
|
|
|
|
prefs.setInt(GlobalConsts.fontZoomSize, fontSize);
|
|
|
|
|
setState(() {});
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
child: RepaintBoundary(
|
|
|
|
|
key: _globalKey,
|
|
|
|
|
child: Material(
|
|
|
|
|
color: ColorConsts.greyF4Color,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.all(0),
|
|
|
|
|
itemCount: ayatTangheemTypeMappedDataList.length > 5 ? 5 : ayatTangheemTypeMappedDataList.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
final _ayatTangheemTypeMappedData = ayatTangheemTypeMappedDataList[index];
|
|
|
|
|
_ayatTangheemTypeMappedData.property?.sort((a, b) => a.orderNo.compareTo(b.orderNo));
|
|
|
|
|
List<TangheemProperty> _tangheemInsideTableList = [];
|
|
|
|
|
List<TangheemProperty> _tangheemAboveTableList = [];
|
|
|
|
|
List<TangheemProperty> _tangheemBelowTableList = [];
|
|
|
|
|
List<String> _tangheemWords = [];
|
|
|
|
|
|
|
|
|
|
List<TangheemProperty> _tempPropertyList = [];
|
|
|
|
|
_tempPropertyList.addAll(_ayatTangheemTypeMappedData?.property ?? <TangheemProperty>[]);
|
|
|
|
|
int firstIndex = _tempPropertyList.indexWhere((element) => element.isInsideTable);
|
|
|
|
|
|
|
|
|
|
if (firstIndex >= 0) {
|
|
|
|
|
var _tempPropertyListTop = _tempPropertyList.take(firstIndex);
|
|
|
|
|
_tempPropertyListTop = _tempPropertyListTop.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
_tangheemAboveTableList = _tempPropertyListTop;
|
|
|
|
|
_tempPropertyListTop.forEach((element) {
|
|
|
|
|
_tempPropertyList.remove(element);
|
|
|
|
|
});
|
|
|
|
|
var _tempPropertyListInside = _tempPropertyList?.where((element) => (element.isInsideTable))?.toList() ?? [];
|
|
|
|
|
_tempPropertyListInside.forEach((element) {
|
|
|
|
|
_tempPropertyList.remove(element);
|
|
|
|
|
});
|
|
|
|
|
_tempPropertyListInside = _tempPropertyListInside.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
_tangheemInsideTableList = _tempPropertyListInside;
|
|
|
|
|
var _tempPropertyListBelow = _tempPropertyList;
|
|
|
|
|
_tempPropertyListBelow = _tempPropertyListBelow.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
_tangheemBelowTableList = _tempPropertyListBelow;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_tangheemWords.add(_ayatTangheemTypeMappedData.highlightText ?? "");
|
|
|
|
|
// _tangheemInsideTableList =
|
|
|
|
|
// _ayatTangheemTypeMappedData?.property?.where((element) => (element.isInsideTable) && (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
// _tangheemAboveTableList =
|
|
|
|
|
// _ayatTangheemTypeMappedData?.property?.where((element) => (!element.isInsideTable) && (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
var _tempTangheemIndexWord = "";
|
|
|
|
|
if (ayatTangheemTypeMappedDataList.length == 1) {
|
|
|
|
|
_tempTangheemIndexWord = "";
|
|
|
|
|
} else {
|
|
|
|
|
_tempTangheemIndexWord = getArabicIndexWord(index) + " ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget innerTableWidget = (_tangheemInsideTableList.isNotEmpty)
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 38,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0xff40696B),
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: Radius.circular(20),
|
|
|
|
|
topRight: Radius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: "خط النبر و التنغيم ل${_ayatTangheemTypeMappedData.tangheemTypeName ?? ""}".toText(16),
|
|
|
|
|
),
|
|
|
|
|
tangheemInsideTablePropertyView(_tangheemInsideTableList)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox();
|
|
|
|
|
|
|
|
|
|
Widget aboveTableWidget = (_tangheemAboveTableList.isNotEmpty)
|
|
|
|
|
? Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 20, right: 20),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
// border: Border(
|
|
|
|
|
// left: BorderSide(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
// right: BorderSide(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
// bottom: BorderSide(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
// top: BorderSide(color: ColorConsts.greyE0Color, width: 0),
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topRight: Radius.circular(20),
|
|
|
|
|
topLeft: Radius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
itemCount: _tangheemAboveTableList.length,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
|
return Divider(color: ColorConsts.greyB7Color, height: 4, thickness: 0);
|
|
|
|
|
},
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Row(
|
|
|
|
|
children: [
|
|
|
|
|
_tangheemAboveTableList[index].propertyText.toText(13, color: ColorConsts.greyB7Color),
|
|
|
|
|
Container(
|
|
|
|
|
width: 1,
|
|
|
|
|
height: 18,
|
|
|
|
|
color: ColorConsts.greyB7Color,
|
|
|
|
|
margin: EdgeInsets.only(left: 8, right: 8),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 4, right: 8),
|
|
|
|
|
// alignment: Alignment.centerRight,
|
|
|
|
|
child: Html(
|
|
|
|
|
data: _tangheemAboveTableList[index]?.propertyValue ?? "",
|
|
|
|
|
style: {
|
|
|
|
|
'html': Style(textAlign: TextAlign.left),
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox();
|
|
|
|
|
|
|
|
|
|
Widget belowTableWidget = (_tangheemBelowTableList.isNotEmpty) ? tangheemOutSideTablePropertyView(_tangheemBelowTableList) : SizedBox();
|
|
|
|
|
|
|
|
|
|
Widget relatedTangheemWidget = (_dataList.isNotEmpty)
|
|
|
|
|
? Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(top: 18, bottom: 18, left: 12, right: 12),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
// border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
"قائمة الأساليب اللغوية في هذه الآية".toText(13, color: ColorConsts.darkText),
|
|
|
|
|
12.height,
|
|
|
|
|
Wrap(
|
|
|
|
|
spacing: 8,
|
|
|
|
|
runSpacing: 8,
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
for (int index = 0; index < _dataList.length; index++)
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
List<AyatTangheemTypeMappedData> list = _dataList;
|
|
|
|
|
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() ??
|
|
|
|
|
[];
|
|
|
|
|
|
|
|
|
|
TangheemDetailParams tangheem =
|
|
|
|
|
TangheemDetailParams(selectedTangheemTypeId: _dataList[index].ayaTangheemTypeId, ayatTangheemTypeMappedDataList: list);
|
|
|
|
|
Navigator.pushNamed(context, TangheemDetailScreen.routeName, arguments: tangheem);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Color(0xff91C1BC),
|
|
|
|
|
),
|
|
|
|
|
child: _dataList[index].tangheemTypeName.toText(12)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox();
|
|
|
|
|
|
|
|
|
|
Widget aboveInnerMerge = Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: Radius.circular(20),
|
|
|
|
|
topRight: Radius.circular(20),
|
|
|
|
|
child: CommonHeader(_ayatTangheemTypeMappedFirstData.tangheemTypeName ?? "", "assets/icons/new/quran_bg.jpg", Color(0xffAE8646),
|
|
|
|
|
isCustom: true, message: _ayatTangheemTypeMappedFirstData.tangheemTypeDescription ?? "", onTap: (headerEnum) {
|
|
|
|
|
if (headerEnum == CommonHeaderEnum.ShareAsText) {
|
|
|
|
|
_shareAyaAsLink();
|
|
|
|
|
} else if (headerEnum == CommonHeaderEnum.ShareAsImage) {
|
|
|
|
|
_shareAyaAsImage();
|
|
|
|
|
} else if (headerEnum == CommonHeaderEnum.ZoomOut) {
|
|
|
|
|
if (fontSize <= 12) {
|
|
|
|
|
Utils.showToast("وصل حجم الخط إلى الحد الأدنى للحجم");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
fontSize -= 2;
|
|
|
|
|
prefs.setInt(GlobalConsts.fontZoomSize, fontSize);
|
|
|
|
|
setState(() {});
|
|
|
|
|
} else if (headerEnum == CommonHeaderEnum.ZoomIn) {
|
|
|
|
|
if (fontSize >= 36) {
|
|
|
|
|
Utils.showToast("وصل حجم الخط إلى الحد الأقصى للحجم");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
fontSize += 2;
|
|
|
|
|
prefs.setInt(GlobalConsts.fontZoomSize, fontSize);
|
|
|
|
|
setState(() {});
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Widget _dataListView = SingleChildScrollView(
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
child: RepaintBoundary(
|
|
|
|
|
key: _globalKey,
|
|
|
|
|
child: Material(
|
|
|
|
|
color: ColorConsts.greyF4Color,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
padding: EdgeInsets.only(top: 24, bottom: 24),
|
|
|
|
|
itemCount: ayatTangheemTypeMappedDataList.length > 5 ? 5 : ayatTangheemTypeMappedDataList.length,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
final _ayatTangheemTypeMappedData = ayatTangheemTypeMappedDataList[index];
|
|
|
|
|
_ayatTangheemTypeMappedData.property?.sort((a, b) => a.orderNo.compareTo(b.orderNo));
|
|
|
|
|
List<TangheemProperty> _tangheemInsideTableList = [];
|
|
|
|
|
List<TangheemProperty> _tangheemAboveTableList = [];
|
|
|
|
|
List<TangheemProperty> _tangheemBelowTableList = [];
|
|
|
|
|
List<String> _tangheemWords = [];
|
|
|
|
|
|
|
|
|
|
List<TangheemProperty> _tempPropertyList = [];
|
|
|
|
|
_tempPropertyList.addAll(_ayatTangheemTypeMappedData?.property ?? <TangheemProperty>[]);
|
|
|
|
|
int firstIndex = _tempPropertyList.indexWhere((element) => element.isInsideTable);
|
|
|
|
|
|
|
|
|
|
if (firstIndex >= 0) {
|
|
|
|
|
var _tempPropertyListTop = _tempPropertyList.take(firstIndex);
|
|
|
|
|
_tempPropertyListTop = _tempPropertyListTop.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
_tangheemAboveTableList = _tempPropertyListTop;
|
|
|
|
|
_tempPropertyListTop.forEach((element) {
|
|
|
|
|
_tempPropertyList.remove(element);
|
|
|
|
|
});
|
|
|
|
|
var _tempPropertyListInside = _tempPropertyList?.where((element) => (element.isInsideTable))?.toList() ?? [];
|
|
|
|
|
_tempPropertyListInside.forEach((element) {
|
|
|
|
|
_tempPropertyList.remove(element);
|
|
|
|
|
});
|
|
|
|
|
_tempPropertyListInside = _tempPropertyListInside.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
_tangheemInsideTableList = _tempPropertyListInside;
|
|
|
|
|
var _tempPropertyListBelow = _tempPropertyList;
|
|
|
|
|
_tempPropertyListBelow = _tempPropertyListBelow.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
_tangheemBelowTableList = _tempPropertyListBelow;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_tangheemWords.add(_ayatTangheemTypeMappedData.highlightText ?? "");
|
|
|
|
|
// _tangheemInsideTableList =
|
|
|
|
|
// _ayatTangheemTypeMappedData?.property?.where((element) => (element.isInsideTable) && (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
// _tangheemAboveTableList =
|
|
|
|
|
// _ayatTangheemTypeMappedData?.property?.where((element) => (!element.isInsideTable) && (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
var _tempTangheemIndexWord = "";
|
|
|
|
|
if (ayatTangheemTypeMappedDataList.length == 1) {
|
|
|
|
|
_tempTangheemIndexWord = "";
|
|
|
|
|
} else {
|
|
|
|
|
_tempTangheemIndexWord = getArabicIndexWord(index) + " ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget innerTableWidget = (_tangheemInsideTableList.isNotEmpty)
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 38,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0xff40696B),
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: Radius.circular(20),
|
|
|
|
|
topRight: Radius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: "خط النبر و التنغيم ل${_ayatTangheemTypeMappedData.tangheemTypeName ?? ""}".toText(16),
|
|
|
|
|
),
|
|
|
|
|
tangheemInsideTablePropertyView(_tangheemInsideTableList)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox();
|
|
|
|
|
|
|
|
|
|
Widget aboveTableWidget = (_tangheemAboveTableList.isNotEmpty)
|
|
|
|
|
? Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 20, right: 20),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
// border: Border(
|
|
|
|
|
// left: BorderSide(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
// right: BorderSide(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
// bottom: BorderSide(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
// top: BorderSide(color: ColorConsts.greyE0Color, width: 0),
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topRight: Radius.circular(20),
|
|
|
|
|
topLeft: Radius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
itemCount: _tangheemAboveTableList.length,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
|
return Divider(color: ColorConsts.greyB7Color, height: 4, thickness: 0);
|
|
|
|
|
},
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Row(
|
|
|
|
|
children: [
|
|
|
|
|
_tangheemAboveTableList[index].propertyText.toText(13, color: ColorConsts.greyB7Color),
|
|
|
|
|
Container(
|
|
|
|
|
width: 1,
|
|
|
|
|
height: 18,
|
|
|
|
|
color: ColorConsts.greyB7Color,
|
|
|
|
|
margin: EdgeInsets.only(left: 8, right: 8),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 4, right: 8),
|
|
|
|
|
// alignment: Alignment.centerRight,
|
|
|
|
|
child: Html(
|
|
|
|
|
data: _tangheemAboveTableList[index]?.propertyValue ?? "",
|
|
|
|
|
style: {
|
|
|
|
|
'html': Style(textAlign: TextAlign.left),
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [aboveTableWidget, innerTableWidget],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox();
|
|
|
|
|
|
|
|
|
|
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)]
|
|
|
|
|
// border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [aboveInnerMerge, belowTableWidget],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
Widget belowTableWidget = (_tangheemBelowTableList.isNotEmpty) ? tangheemOutSideTablePropertyView(_tangheemBelowTableList) : SizedBox();
|
|
|
|
|
|
|
|
|
|
return ListView(
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
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(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
SvgPicture.asset("assets/icons/new/surah_right.svg", height: 13, width: 11, color: ColorConsts.darkText),
|
|
|
|
|
12.width,
|
|
|
|
|
_ayatTangheemTypeMappedData.surahNameAr.toText(13, color: ColorConsts.darkText, textAlign: TextAlign.center, height: 22),
|
|
|
|
|
12.width,
|
|
|
|
|
SvgPicture.asset("assets/icons/new/surah_left.svg", height: 13, width: 11, color: ColorConsts.darkText)
|
|
|
|
|
],
|
|
|
|
|
).center,
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 21, bottom: 21),
|
|
|
|
|
padding: EdgeInsets.all(12),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: TextHighLightLengthWidget(
|
|
|
|
|
text: _ayatTangheemTypeMappedData.reverseAyatNumber(),
|
|
|
|
|
startIndex: _ayatTangheemTypeMappedData.startIndex,
|
|
|
|
|
endIndex: _ayatTangheemTypeMappedData.endIndex,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
fontSize: fontSize.toDouble(),
|
|
|
|
|
highlightAya: _ayatTangheemTypeMappedData.highlightText,
|
|
|
|
|
highlightAyaNos: _ayatTangheemTypeMappedData.highlightAyaNos ?? "",
|
|
|
|
|
ayahTextList: _ayatTangheemTypeMappedData.ayahTextList,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
Widget relatedTangheemWidget = (_dataList.isNotEmpty)
|
|
|
|
|
? Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(top: 18, bottom: 18, left: 12, right: 12),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
// border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
"قائمة الأساليب اللغوية في هذه الآية".toText(13, color: ColorConsts.darkText),
|
|
|
|
|
12.height,
|
|
|
|
|
Wrap(
|
|
|
|
|
spacing: 8,
|
|
|
|
|
runSpacing: 8,
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
for (int index = 0; index < _dataList.length; index++)
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
List<AyatTangheemTypeMappedData> list = _dataList;
|
|
|
|
|
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() ?? [];
|
|
|
|
|
|
|
|
|
|
TangheemDetailParams tangheem = TangheemDetailParams(selectedTangheemTypeId: _dataList[index].ayaTangheemTypeId, ayatTangheemTypeMappedDataList: list);
|
|
|
|
|
Navigator.pushNamed(context, TangheemDetailScreen.routeName, arguments: tangheem);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Color(0xff91C1BC),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [aboveInnerBelowMerge, relatedTangheemWidget],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
child: _dataList[index].tangheemTypeName.toText(12)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// if (MediaQuery.of(context).orientation == Orientation.portrait)
|
|
|
|
|
AyaPlayerWidget(
|
|
|
|
|
surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "",
|
|
|
|
|
ayaTangheemTypeId: _ayatTangheemTypeMappedFirstData?.tangheemTypeId ?? "",
|
|
|
|
|
globalKey: _globalKey,
|
|
|
|
|
numberInSurah: _ayatTangheemTypeMappedFirstData?.ayatNumberInSurahs,
|
|
|
|
|
ayaNo: _ayatTangheemTypeMappedFirstData?.ayahNo,
|
|
|
|
|
surahNo: _ayatTangheemTypeMappedFirstData?.surahNo,
|
|
|
|
|
voiceNoteList: voiceNoteList)
|
|
|
|
|
.paddingOnly(left: 24, right: 24),
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
AyaRecordWidget().paddingOnly(left: 24, right: 24),
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
discussionView(_discussionModel?.data ?? []).paddingOnly(left: 24, right: 24),
|
|
|
|
|
SizedBox(height: 16),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox();
|
|
|
|
|
|
|
|
|
|
Widget aboveInnerMerge = Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: Radius.circular(20),
|
|
|
|
|
topRight: Radius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (false)
|
|
|
|
|
Column(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [aboveTableWidget, innerTableWidget],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
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)]
|
|
|
|
|
// border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [aboveInnerMerge, belowTableWidget],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return ListView(
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
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(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
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),
|
|
|
|
|
SvgPicture.asset("assets/icons/new/surah_right.svg", height: 13, width: 11, color: ColorConsts.darkText),
|
|
|
|
|
12.width,
|
|
|
|
|
_ayatTangheemTypeMappedData.surahNameAr.toText(13, color: ColorConsts.darkText, textAlign: TextAlign.center, height: 22),
|
|
|
|
|
12.width,
|
|
|
|
|
SvgPicture.asset("assets/icons/new/surah_left.svg", height: 13, width: 11, color: ColorConsts.darkText)
|
|
|
|
|
],
|
|
|
|
|
).center,
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 21, bottom: 21),
|
|
|
|
|
padding: EdgeInsets.all(12),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: TextHighLightLengthWidget(
|
|
|
|
|
text: _ayatTangheemTypeMappedData.reverseAyatNumber(),
|
|
|
|
|
startIndex: _ayatTangheemTypeMappedData.startIndex,
|
|
|
|
|
endIndex: _ayatTangheemTypeMappedData.endIndex,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
fontSize: fontSize.toDouble(),
|
|
|
|
|
highlightAya: _ayatTangheemTypeMappedData.highlightText,
|
|
|
|
|
highlightAyaNos: _ayatTangheemTypeMappedData.highlightAyaNos ?? "",
|
|
|
|
|
ayahTextList: _ayatTangheemTypeMappedData.ayahTextList,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
border: Border.all(color: ColorConsts.greyE0Color, width: 1),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [aboveInnerBelowMerge, relatedTangheemWidget],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
Widget _ayaPlayer = AyaPlayerWidget(
|
|
|
|
|
surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "",
|
|
|
|
|
ayaTangheemTypeId: _ayatTangheemTypeMappedFirstData?.tangheemTypeId ?? "",
|
|
|
|
|
globalKey: _globalKey,
|
|
|
|
|
numberInSurah: _ayatTangheemTypeMappedFirstData?.ayatNumberInSurahs,
|
|
|
|
|
ayaNo: _ayatTangheemTypeMappedFirstData?.ayahNo,
|
|
|
|
|
surahNo: _ayatTangheemTypeMappedFirstData?.surahNo,
|
|
|
|
|
voiceNoteList: voiceNoteList)
|
|
|
|
|
.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),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Row(
|
|
|
|
|
children: [
|
|
|
|
|
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),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|