Modify Patiant screen List style

merge-requests/98/head
Amjad Amireh 6 years ago
parent 49f8da4a05
commit cc2c0f9a1e

@ -317,7 +317,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(
0, 250, 0, 0), 0, 0, 0, 0),//250
child: child:
DrAppCircularProgressIndeicator(), DrAppCircularProgressIndeicator(),
)), )),
@ -367,182 +367,192 @@ class _PatientsScreenState extends State<PatientsScreen> {
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: responseModelList children: responseModelList
.map((PatiantInformtion item) { .map((PatiantInformtion item) {
return InkWell( return Container(
child: CardWithBgWidgetNew( decoration: myBoxDecoration(),
//CardWithBgWidget( child: InkWell(
child: CardWithBgWidgetNew(
widget: Column( //CardWithBgWidget(
children: <Widget>[
Row( widget: Column(
children: <Widget>[ children: <Widget>[
Column( Container(
mainAxisAlignment: // decoration: myBoxDecoration(),
MainAxisAlignment child: Row(
.start,
children:
item.genderDescription ==
"Male"
? [
SvgPicture.asset(
url +
avatarMale,
height:
80.0,
width:
80.0,
semanticsLabel:
'Male Logo')
]
: [
SvgPicture.asset(
url +
avatarFemale,
height:
80.0,
width:
80.0,
semanticsLabel:
'Female Logo')
],
),
SizedBox(
width: 10,
),
Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[ children: <Widget>[
AppText( Column(
item.firstName + mainAxisAlignment:
" " + MainAxisAlignment
item.lastName, .start,
fontSize: 2.0 * children:
SizeConfig item.genderDescription ==
.textMultiplier, "Male"
fontWeight: ? [
FontWeight SvgPicture.asset(
.bold, url +
backGroundcolor: avatarMale,
Colors.white, height:
), 80.0,
SizedBox( width:
height: 8, 80.0,
), semanticsLabel:
AppText( 'Male Logo')
"File Number:" + ]
item.patientId : [
.toString(), SvgPicture.asset(
fontSize: 2.0 * url +
SizeConfig avatarFemale,
.textMultiplier, height:
fontWeight: 80.0,
FontWeight width:
.bold, 80.0,
backGroundcolor: semanticsLabel:
Colors.white, 'Female Logo')
), ],
// SizedBox(
// height: 8,
// ),
AppText(
"Age:" +
item.age
.toString(),
fontSize: 2.0 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight
.bold,
backGroundcolor:
Colors.white,
), ),
SizedBox( SizedBox(
height: 8, width: 10,
), ),
SERVICES_PATIANT2[int Column(
.parse( crossAxisAlignment:
patientType)] == CrossAxisAlignment
"List_MyOutPatient" .start,
? Row( children: <Widget>[
mainAxisAlignment: AppText(
MainAxisAlignment item.firstName +
.spaceBetween, " " +
children: < item.lastName,
Widget>[ fontSize: 2.0 *
Container( SizeConfig
height: .textMultiplier,
20, fontWeight:
width: FontWeight
80, .bold,
decoration: backGroundcolor:
BoxDecoration( Colors.white,
borderRadius: ),
BorderRadius.circular(50), SizedBox(
color: height: 8,
Hexcolor("#20A169"), ),
), AppText(
child: "File Number:" +
AppText( item.patientId
item.startTime, .toString(),
color: fontSize: 2.0 *
Colors.white, SizeConfig
fontSize: .textMultiplier,
2 * SizeConfig.textMultiplier, fontWeight:
textAlign: FontWeight
TextAlign.center, .bold,
fontWeight: backGroundcolor:
FontWeight.bold, Colors.white,
), ),
),
SizedBox( // SizedBox(
width: // height: 8,
60, // ),
), AppText(
Container( "Age:" +
child: item.age
AppText( .toString(),
convertDateFormat2(item fontSize: 2.0 *
.appointmentDate SizeConfig
.toString()), .textMultiplier,
fontSize: fontWeight:
2.0 * SizeConfig.textMultiplier, FontWeight
fontWeight: .bold,
FontWeight.bold, backGroundcolor:
), Colors.white,
),
SizedBox(
height: 8,
),
SERVICES_PATIANT2[int
.parse(
patientType)] ==
"List_MyOutPatient"
? Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: <
Widget>[
Container(
height:
20,
width:
80,
decoration:
BoxDecoration(
borderRadius:
BorderRadius.circular(50),
color:
Hexcolor("#20A169"),
),
child:
AppText(
item.startTime,
color:
Colors.white,
fontSize:
2 * SizeConfig.textMultiplier,
textAlign:
TextAlign.center,
fontWeight:
FontWeight.bold,
),
),
SizedBox(
width:
60,
),
Container(
child:
AppText(
convertDateFormat2(item
.appointmentDate
.toString()),
fontSize:
2.0 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
),
)
],
) )
], : AppText(
) item.nationalityName,
: AppText( fontSize: 2.5 *
item.nationalityName, SizeConfig
fontSize: 2.5 * .textMultiplier,
SizeConfig ),
.textMultiplier, ],
), ),
// Divider(color: Colors.grey)
], ],
), ),
], ),
), // Divider(color: Colors.grey)
Divider(color: Colors.grey) ],
], ),
), ),
onTap: () {
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": item
});
},
), ),
onTap: () {
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": item
});
},
); );
}).toList(),
}).toList(),
), ),
), ),
], ],
), ),
) )
], ],
), ),
@ -633,4 +643,19 @@ class _PatientsScreenState extends State<PatientsScreen> {
), ),
); );
} }
myBoxDecoration() {
return BoxDecoration(
border: Border(
bottom: BorderSide( // <--- top side
color: Colors.grey,
width: 1.0,
),
),
);
}
} }

@ -36,6 +36,7 @@ class CardWithBgWidgetNew extends StatelessWidget {
children: [ children: [
Center( Center(
child: Container( child: Container(
// padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10 // padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10
// margin: EdgeInsets.only(left: 10), // margin: EdgeInsets.only(left: 10),
child: Padding( child: Padding(
@ -48,4 +49,6 @@ class CardWithBgWidgetNew extends StatelessWidget {
), ),
); );
} }
} }

Loading…
Cancel
Save