@ -129,7 +129,7 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
) ,
SizedBox ( height: 8 ) ,
Text (
" هنا نضع \" تعريف بالاستفهام وتداخل الأساليب \ "" ,
_ayatTangheemTypeMappedFirstData . tangheemTypeDescription ? ? "" ,
style: TextStyle ( fontSize: 14 , color: ColorConsts . textGrey , height: 1 ) ,
) ,
SizedBox ( height: 8 ) ,
@ -150,115 +150,127 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
child: RepaintBoundary (
key: _globalKey ,
child: Material (
color: Colors . white ,
child: ListView . builder (
physics: NeverScrollableScrollPhysics ( ) ,
shrinkWrap: true ,
itemCount: ayatTangheemTypeMappedDataList . length > 5 ? 5 : ayatTangheemTypeMappedDataList . length ,
itemBuilder: ( context , index ) {
var _ayatTangheemTypeMappedData = ayatTangheemTypeMappedDataList [ index ] ;
List < TangheemProperty > _tangheemInsideTableTrueList = [ ] ;
List < TangheemProperty > _tangheemInsideTableValueList = [ ] ;
List < TangheemProperty > _tangheemInsideTableEmptyList = [ ] ;
List < String > _tangheemWords = [ ] ;
color: Colors . white ,
child: ListView . builder (
physics: NeverScrollableScrollPhysics ( ) ,
shrinkWrap: true ,
itemCount: ayatTangheemTypeMappedDataList . length > 5 ? 5 : ayatTangheemTypeMappedDataList . length ,
itemBuilder: ( context , index ) {
var _ayatTangheemTypeMappedData = ayatTangheemTypeMappedDataList [ index ] ;
List < TangheemProperty > _tangheemInsideTableTrueList = [ ] ;
List < TangheemProperty > _tangheemInsideTableValueList = [ ] ;
List < TangheemProperty > _tangheemInsideTableEmptyList = [ ] ;
List < String > _tangheemWords = [ ] ;
_tangheemWords . add ( _ayatTangheemTypeMappedData . highlightText ? ? " " ) ;
_tangheemInsideTableTrueList =
_ayatTangheemTypeMappedData ? . property ? . where ( ( element ) = > ( element . isInsideTable ) & & ( element . propertyValue ? ? " " ) . isNotEmpty ) ? . toList ( ) ? ? [ ] ;
_tangheemInsideTableValueList =
_ayatTangheemTypeMappedData ? . property ? . where ( ( element ) = > ( ! element . isInsideTable ) & & ( element . propertyValue ? ? " " ) . isNotEmpty ) ? . toList ( ) ? ? [ ] ;
_tangheemWords . add ( _ayatTangheemTypeMappedData . highlightText ? ? " " ) ;
_tangheemInsideTableTrueList =
_ayatTangheemTypeMappedData ? . property ? . where ( ( element ) = > ( element . isInsideTable ) & & ( element . propertyValue ? ? " " ) . isNotEmpty ) ? . toList ( ) ? ? [ ] ;
_tangheemInsideTableValueList =
_ayatTangheemTypeMappedData ? . property ? . where ( ( element ) = > ( ! element . isInsideTable ) & & ( element . propertyValue ? ? " " ) . isNotEmpty ) ? . toList ( ) ? ? [ ] ;
return ListView (
physics: NeverScrollableScrollPhysics ( ) ,
shrinkWrap: true ,
padding: EdgeInsets . all ( 4 ) ,
children: [
Row (
children: [
Text (
" جمله ${ _ayatTangheemTypeMappedData . tangheemTypeName } ${ getArabicIndexWord ( index ) } " ,
style: TextStyle ( fontWeight: FontWeight . bold , color: Colors . white , backgroundColor: ColorConsts . primaryBlue ) ,
) ,
Expanded (
child: Container ( height: 2 , color: ColorConsts . primaryBlue ) ,
) ,
] ,
) ,
SizedBox ( height: 8 ) ,
TextHighLightWidget (
text: _ayatTangheemTypeMappedData . reverseAyatNumber ( ) ? ? " " ,
valueColor: ColorConsts . primaryBlue ,
highlights: _tangheemWords ,
highLightFontSize: fontSize ,
style: TextStyle (
fontFamily: " UthmanicHafs " ,
fontSize: fontSize ,
fontWeight: FontWeight . bold ,
var _tempTangheemIndexWord = " " ;
if ( ayatTangheemTypeMappedDataList . length = = 1 ) {
_tempTangheemIndexWord = " " ;
} else {
_tempTangheemIndexWord = getArabicIndexWord ( index ) ;
}
return ListView (
physics: NeverScrollableScrollPhysics ( ) ,
shrinkWrap: true ,
padding: EdgeInsets . all ( 4 ) ,
children: [
Row (
children: [
Text (
" جمله ${ _ayatTangheemTypeMappedData . tangheemTypeName } $ _tempTangheemIndexWord " ,
style: TextStyle ( fontWeight: FontWeight . bold , color: Colors . white , backgroundColor: ColorConsts . primaryBlue ) ,
) ,
Expanded (
child: Container ( height: 2 , color: ColorConsts . primaryBlue ) ,
) ,
] ,
) ,
SizedBox ( height: 8 ) ,
TextHighLightWidget (
text: _ayatTangheemTypeMappedData . reverseAyatNumber ( ) ? ? " " ,
valueColor: ColorConsts . primaryBlue ,
highlights: _tangheemWords ,
highLightFontSize: fontSize ,
style: TextStyle (
fontFamily: " UthmanicHafs " ,
fontSize: fontSize ,
fontWeight: FontWeight . bold ,
) ,
SizedBox ( height: 16 ) ,
ListView . separated (
itemCount: _tangheemInsideTableValueList . length ,
physics: NeverScrollableScrollPhysics ( ) ,
shrinkWrap: true ,
separatorBuilder: ( context , index ) {
return Divider (
color: Colors . white ,
height: 1 ,
thickness: 0 ,
) ;
} ,
itemBuilder: ( context , index ) {
return Row (
children: [
Expanded (
child: Container (
height: 40 ,
padding: EdgeInsets . only ( left: 4 , right: 8 ) ,
alignment: Alignment . centerRight ,
child: Text (
_tangheemInsideTableValueList [ index ] . propertyText ,
style: TextStyle ( fontWeight: FontWeight . bold , color: ColorConsts . secondaryOrange ) ,
) ,
color: ColorConsts . secondaryWhite ,
) ,
SizedBox ( height: 16 ) ,
ListView . separated (
itemCount: _tangheemInsideTableValueList . length ,
physics: NeverScrollableScrollPhysics ( ) ,
shrinkWrap: true ,
separatorBuilder: ( context , index ) {
return Divider (
color: Colors . white ,
height: 1 ,
thickness: 0 ,
) ;
} ,
itemBuilder: ( context , index ) {
return Row (
children: [
Expanded (
child: Container (
height: 40 ,
padding: EdgeInsets . only ( left: 4 , right: 8 ) ,
alignment: Alignment . centerRight ,
child: Text (
_tangheemInsideTableValueList [ index ] . propertyText ,
style: TextStyle ( fontWeight: FontWeight . bold , color: ColorConsts . secondaryOrange ) ,
) ,
color: ColorConsts . secondaryWhite ,
) ,
SizedBox ( width: 8 ) ,
Expanded (
child: Container (
height: 40 ,
padding: EdgeInsets . only ( left: 4 , right: 8 ) ,
alignment: Alignment . centerRight ,
child: Text (
_tangheemInsideTableValueList [ index ] . propertyValue ,
style: TextStyle ( color: ColorConsts . primaryBlack ) ,
) ,
SizedBox ( width: 8 ) ,
Expanded (
child: Container (
height: 40 ,
padding: EdgeInsets . only ( left: 4 , right: 8 ) ,
alignment: Alignment . centerRight ,
child: Text (
_tangheemInsideTableValueList [ index ] . propertyValue ,
style: TextStyle (
color: Color (
Utils . stringToHex ( _tangheemInsideTableValueList [ index ] . textColor ) ,
) ,
) ,
color: ColorConsts . secondaryWhite ,
) ,
)
] ,
) ;
} ) ,
if ( _tangheemInsideTableTrueList . isNotEmpty )
Container (
color: ColorConsts . primaryBlue ,
margin: EdgeInsets . only ( top: 8 , bottom: 8 ) ,
padding: EdgeInsets . all ( 8 ) ,
child: Column (
children: [
Text (
_ayatTangheemTypeMappedData . tangheemTypeName ? ? " " ,
style: TextStyle ( fontWeight: FontWeight . bold , color: Colors . white ) ,
) ,
SizedBox ( height: 8 ) ,
tangheemPropertyView ( _tangheemInsideTableTrueList )
color: ColorConsts . secondaryWhite ,
) ,
)
] ,
) ,
) ;
} ) ,
if ( _tangheemInsideTableTrueList . isNotEmpty )
Container (
color: ColorConsts . primaryBlue ,
margin: EdgeInsets . only ( top: 8 , bottom: 8 ) ,
padding: EdgeInsets . all ( 8 ) ,
child: Column (
children: [
Text (
_ayatTangheemTypeMappedData . tangheemTypeName ? ? " " ,
style: TextStyle ( fontWeight: FontWeight . bold , color: Colors . white ) ,
) ,
SizedBox ( height: 8 ) ,
tangheemPropertyView ( _tangheemInsideTableTrueList )
] ,
) ,
tangheemPropertyView ( _tangheemInsideTableEmptyList )
] ,
) ;
} ) ) ,
) ,
tangheemPropertyView ( _tangheemInsideTableEmptyList )
] ,
) ;
} ) ,
) ,
) ,
) ,
) ,
@ -346,7 +358,12 @@ class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
SizedBox ( height: 4 ) ,
Text (
tangheemPropertyList [ index ] . propertyValue ? ? " " ,
style: TextStyle ( fontSize: 12 , color: ColorConsts . secondaryPink ) ,
style: TextStyle (
fontSize: 12 ,
color: Color (
Utils . stringToHex ( tangheemPropertyList [ index ] . textColor ) ,
) ,
) ,
) ,
] ,
) ,