|
|
|
@ -55,110 +55,157 @@ class _ApointmentCardState extends State<AppointmentCard> {
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
width: projectViewModel.isArabic ? 27 : 20,
|
|
|
|
|
height: projectViewModel.isArabic ? 165 : 140,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
//Colors.red[900] Color(0xff404545)
|
|
|
|
|
color: widget.appo.isLiveCareAppointment
|
|
|
|
|
? Color(0xff404545)
|
|
|
|
|
: !widget.appo.isInOutPatient
|
|
|
|
|
? Colors.red[900]
|
|
|
|
|
: Theme.of(context).primaryColor,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: projectViewModel.isArabic
|
|
|
|
|
? Radius.circular(0)
|
|
|
|
|
: Radius.circular(8),
|
|
|
|
|
bottomLeft: projectViewModel.isArabic
|
|
|
|
|
? Radius.circular(0)
|
|
|
|
|
: Radius.circular(8),
|
|
|
|
|
topRight: projectViewModel.isArabic
|
|
|
|
|
? Radius.circular(8)
|
|
|
|
|
: Radius.circular(0),
|
|
|
|
|
bottomRight: projectViewModel.isArabic
|
|
|
|
|
? Radius.circular(8)
|
|
|
|
|
: Radius.circular(0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: RotatedBox(
|
|
|
|
|
quarterTurns: 3,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
widget.appo.isLiveCareAppointment
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.liveCare
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: !widget.appo.isInOutPatient
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.inPatient
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context)
|
|
|
|
|
.outpatient
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
style: TextStyle(color: Colors.white),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8,),
|
|
|
|
|
ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(100.0),
|
|
|
|
|
child: Image.network(widget.appo.doctorImageURL,
|
|
|
|
|
fit: BoxFit.fill, height: 60.0, width: 60.0),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.61,
|
|
|
|
|
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
widget.appo.doctorTitle +
|
|
|
|
|
" " +
|
|
|
|
|
widget.appo.doctorNameObj,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
color: Colors.grey[700],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0),
|
|
|
|
|
child: Text(widget.appo.clinicName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0),
|
|
|
|
|
child: Text(widget.appo.projectName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
DateUtil.getWeekDayMonthDayYearDateFormatted(
|
|
|
|
|
DateUtil.convertStringToDate(
|
|
|
|
|
widget.appo.appointmentDate),
|
|
|
|
|
projectViewModel.isArabic ? "ar" : "en")
|
|
|
|
|
.trim(),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.61,
|
|
|
|
|
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
widget.appo.doctorTitle +
|
|
|
|
|
" " +
|
|
|
|
|
widget.appo.doctorNameObj,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
color: Colors.grey[700],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating:
|
|
|
|
|
widget.appo.actualDoctorRate.toDouble(),
|
|
|
|
|
size: 20.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
transform:
|
|
|
|
|
Matrix4.translationValues(15.0, -40.0, 0.0),
|
|
|
|
|
child: projectViewModel.isArabic
|
|
|
|
|
? Image.asset(
|
|
|
|
|
"assets/images/new-design/arrow_menu_black-ar.png",
|
|
|
|
|
width: 25.0,
|
|
|
|
|
height: 25.0)
|
|
|
|
|
: Image.asset(
|
|
|
|
|
"assets/images/new-design/arrow_menu_black-en.png",
|
|
|
|
|
width: 25.0,
|
|
|
|
|
height: 25.0),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
(widget.appo.patientStatusType == AppointmentType.BOOKED ||
|
|
|
|
|
widget.appo.patientStatusType ==
|
|
|
|
|
AppointmentType.CONFIRMED)
|
|
|
|
|
? Container(
|
|
|
|
|
child: CountdownTimer(
|
|
|
|
|
controller: new CountdownTimerController(
|
|
|
|
|
endTime:
|
|
|
|
|
DateTime.now().millisecondsSinceEpoch +
|
|
|
|
|
(widget.appo.remaniningHoursTocanPay *
|
|
|
|
|
1000) *
|
|
|
|
|
60),
|
|
|
|
|
widgetBuilder: (_, CurrentRemainingTime time) {
|
|
|
|
|
return time != null
|
|
|
|
|
? Text(
|
|
|
|
|
'${time.days}:${time.hours}:${time.min}:${time.sec} ' +
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.upcomingTimeLeft,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Color(0xff40ACC9)))
|
|
|
|
|
: Container();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: Container(),
|
|
|
|
|
],
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0),
|
|
|
|
|
child: Text(widget.appo.clinicName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0),
|
|
|
|
|
child: Text(widget.appo.projectName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
DateUtil.getWeekDayMonthDayYearDateFormatted(
|
|
|
|
|
DateUtil.convertStringToDate(
|
|
|
|
|
widget.appo.appointmentDate),
|
|
|
|
|
projectViewModel.isArabic ? "ar" : "en")
|
|
|
|
|
.trim(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating:
|
|
|
|
|
widget.appo.actualDoctorRate.toDouble(),
|
|
|
|
|
size: 20.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
transform:
|
|
|
|
|
Matrix4.translationValues(15.0, -40.0, 0.0),
|
|
|
|
|
child: projectViewModel.isArabic
|
|
|
|
|
? Image.asset(
|
|
|
|
|
"assets/images/new-design/arrow_menu_black-ar.png",
|
|
|
|
|
width: 25.0,
|
|
|
|
|
height: 25.0)
|
|
|
|
|
: Image.asset(
|
|
|
|
|
"assets/images/new-design/arrow_menu_black-en.png",
|
|
|
|
|
width: 25.0,
|
|
|
|
|
height: 25.0),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
(widget.appo.patientStatusType == AppointmentType.BOOKED ||
|
|
|
|
|
widget.appo.patientStatusType ==
|
|
|
|
|
AppointmentType.CONFIRMED)
|
|
|
|
|
? Container(
|
|
|
|
|
child: CountdownTimer(
|
|
|
|
|
controller: new CountdownTimerController(
|
|
|
|
|
endTime:
|
|
|
|
|
DateTime.now().millisecondsSinceEpoch +
|
|
|
|
|
(widget.appo.remaniningHoursTocanPay *
|
|
|
|
|
1000) *
|
|
|
|
|
60),
|
|
|
|
|
widgetBuilder: (_, CurrentRemainingTime time) {
|
|
|
|
|
return time != null
|
|
|
|
|
? Text(
|
|
|
|
|
'${time.days}:${time.hours}:${time.min}:${time.sec} ' +
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.upcomingTimeLeft,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Color(0xff40ACC9)))
|
|
|
|
|
: Container();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: Container(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|