@ -93,243 +93,315 @@ class _ToDoState extends State<ToDo> {
itemBuilder: ( context , index ) {
return Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Card (
margin: EdgeInsets . fromLTRB ( 8.0 , 0.0 , 8.0 , 8.0 ) ,
color: Colors . white ,
shape: RoundedRectangleBorder (
borderRadius: BorderRadius . circular ( 10 ) ,
) ,
child: Container (
width: MediaQuery . of ( context ) . size . width ,
padding: EdgeInsets . all ( 10.0 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
mainAxisSize: MainAxisSize . max ,
children: < Widget > [
Row (
children: < Widget > [
Image . asset (
" assets/images/new-design/time_icon.png " ,
width: 20.0 ,
height: 20.0 ) ,
Container (
margin:
EdgeInsets . only ( left: 10.0 , right: 10.0 ) ,
child: Text (
DateUtil . getWeekDayMonthDayYearDateFormatted (
DateUtil . convertStringToDate (
widget . appoList [ index ]
. appointmentDate ) ,
projectViewModel . isArabic
? " ar "
: " en " ) +
" " +
widget . appoList [ index ] . startTime
. substring ( 0 , 5 ) ,
style: TextStyle ( fontSize: 10.0 ) ) ,
) ,
! widget . appoList [ index ] . isLiveCareAppointment
? Image . asset (
" assets/images/new-design/hospital_address_icon.png " ,
width: 20.0 ,
height: 20.0 )
: Container ( ) ,
Container (
margin:
EdgeInsets . only ( left: 5.0 , right: 5.0 ) ,
child: widget
. appoList [ index ] . isLiveCareAppointment
? Container ( )
: Text (
widget . appoList [ index ] . projectName ! =
null
? widget
. appoList [ index ] . projectName
: " - " ,
overflow: TextOverflow . clip ,
maxLines: 2 ,
style: TextStyle ( fontSize: 10.0 ) ) ,
) ,
] ,
) ,
Container (
margin: EdgeInsets . only ( top: 5.0 ) ,
child: Divider (
color: Colors . grey [ 500 ] ,
) ,
child: Column (
children: [
Container (
child: Card (
margin: EdgeInsets . fromLTRB ( 8.0 , 0.0 , 8.0 , 8.0 ) ,
color: Colors . white ,
shape: RoundedRectangleBorder (
borderRadius: BorderRadius . circular ( 10 ) ,
) ,
Flex (
direction: Axis . horizontal ,
children: < Widget > [
Expanded (
flex: 1 ,
child: Container (
height: MediaQuery . of ( context ) . size . height *
0.1 ,
child: Container (
width: MediaQuery . of ( context ) . size . width ,
padding: EdgeInsets . all ( 10.0 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
mainAxisSize: MainAxisSize . max ,
children: < Widget > [
Row (
children: < Widget > [
Image . asset (
" assets/images/new-design/time_icon.png " ,
width: 20.0 ,
height: 20.0 ) ,
Container (
margin: EdgeInsets . only (
left: 10.0 , right: 10.0 ) ,
child: Text (
DateUtil . getWeekDayMonthDayYearDateFormatted (
DateUtil . convertStringToDate (
widget . appoList [ index ]
. appointmentDate ) ,
projectViewModel . isArabic
? " ar "
: " en " ) +
" " +
widget . appoList [ index ] . startTime
. substring ( 0 , 5 ) ,
style: TextStyle ( fontSize: 10.0 ) ) ,
) ,
! widget . appoList [ index ]
. isLiveCareAppointment
? Image . asset (
" assets/images/new-design/hospital_address_icon.png " ,
width: 20.0 ,
height: 20.0 )
: Container ( ) ,
Container (
margin: EdgeInsets . only (
left: 5.0 , right: 5.0 ) ,
child: widget . appoList [ index ]
. isLiveCareAppointment
? Container ( )
: Text (
widget . appoList [ index ]
. projectName ! =
null
? widget . appoList [ index ]
. projectName
: " - " ,
overflow: TextOverflow . clip ,
maxLines: 2 ,
style:
TextStyle ( fontSize: 10.0 ) ) ,
) ,
] ,
) ,
Container (
margin: EdgeInsets . only ( top: 5.0 ) ,
child: ClipRRect (
borderRadius:
BorderRadius . circular ( 100.0 ) ,
child: Image . network (
widget . appoList [ index ] . doctorImageURL ,
fit: BoxFit . fill ) ,
child: Divider (
color: Colors . grey [ 500 ] ,
) ,
) ,
) ,
Expanded (
flex: 3 ,
child: Container (
margin: EdgeInsets . only (
top: 10.0 , left: 20.0 , right: 20.0 ) ,
child: Column (
crossAxisAlignment:
CrossAxisAlignment . start ,
children: < Widget > [
Text (
widget . appoList [ index ] . doctorTitle +
" " +
Flex (
direction: Axis . horizontal ,
children: < Widget > [
Expanded (
flex: 1 ,
child: Container (
height: MediaQuery . of ( context )
. size
. height *
0.1 ,
margin: EdgeInsets . only ( top: 5.0 ) ,
child: ClipRRect (
borderRadius:
BorderRadius . circular ( 100.0 ) ,
child: Image . network (
widget . appoList [ index ]
. doctorNameObj ,
style: TextStyle (
fontSize: 14.0 ,
color: Colors . black ,
fontWeight: FontWeight . bold ,
letterSpacing: 1.0 ) ) ,
Container (
margin: EdgeInsets . only (
top: 3.0 , bottom: 3.0 ) ,
child: Text (
getDoctorSpeciality ( widget
. appoList [ index ]
. doctorSpeciality )
. trim ( ) ,
style: TextStyle (
fontSize: 12.0 ,
color: Colors . grey [ 600 ] ,
letterSpacing: 1.0 ) ) ,
. doctorImageURL ,
fit: BoxFit . fill ) ,
) ,
) ,
Row (
mainAxisAlignment:
MainAxisAlignment . spaceBetween ,
mainAxisSize: MainAxisSize . max ,
children: < Widget > [
RatingBar . readOnly (
initialRating: widget
. appoList [ index ]
. 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 ,
) ,
] ,
) ,
Expanded (
flex: 3 ,
child: Container (
margin: EdgeInsets . only (
top: 10.0 ,
left: 20.0 ,
right: 20.0 ) ,
child: Column (
crossAxisAlignment:
CrossAxisAlignment . start ,
children: < Widget > [
Text (
widget . appoList [ index ]
. doctorTitle +
" " +
widget . appoList [ index ]
. doctorNameObj ,
style: TextStyle (
fontSize: 14.0 ,
color: Colors . black ,
fontWeight:
FontWeight . bold ,
letterSpacing: 1.0 ) ) ,
Container (
margin: EdgeInsets . only (
top: 3.0 , bottom: 3.0 ) ,
child: Text (
getDoctorSpeciality ( widget
. appoList [ index ]
. doctorSpeciality )
. 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
. appoList [ index ]
. 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 (
child: CountdownTimer (
controller: new CountdownTimerController (
endTime: DateTime . now ( )
. millisecondsSinceEpoch +
( widget
. appoList [
index ]
. remaniningHoursTocanPay *
1000 ) *
60 ) ,
widgetBuilder: ( _ ,
CurrentRemainingTime
time ) {
return time ! = null
? Text (
' ${ time . days ! = null ? time . days : " 0 " } : ${ time . hours . toString ( ) . length = = 1 ? " 0 " + time . hours . toString ( ) : time . hours } : ${ time . min } : ${ time . sec } ' +
TranslationBase . of (
context )
. upcomingTimeLeft ,
style: TextStyle (
fontSize: 12.0 ,
color: Color (
0xff40ACC9 ) ) )
: Container ( ) ;
} ,
) ,
) ,
] ,
) ,
) ,
Container (
child: CountdownTimer (
controller: new CountdownTimerController (
endTime: DateTime . now ( )
. millisecondsSinceEpoch +
( widget . appoList [ index ]
. remaniningHoursTocanPay *
1000 ) *
60 ) ,
widgetBuilder:
( _ , CurrentRemainingTime time ) {
return time ! = null
? Text (
' ${ time . days ! = null ? time . days : " 0 " } : ${ time . hours . toString ( ) . length = = 1 ? " 0 " + time . hours . toString ( ) : time . hours } : ${ time . min } : ${ time . sec } ' +
TranslationBase . of (
context )
. upcomingTimeLeft ,
) ,
Expanded (
flex: 1 ,
child: InkWell (
onTap: ( ) = > performNextAction (
widget . appoList [ index ] ) ,
child: Container (
margin: EdgeInsets . only ( top: 20.0 ) ,
child: Column (
children: < Widget > [
Image . asset (
getNextActionImage ( widget
. appoList [ index ]
. nextAction ) ,
width: 50.0 ,
height: 50.0 ) ,
Container (
margin:
EdgeInsets . only ( top: 5.0 ) ,
child: Text (
getNextActionText ( widget
. appoList [ index ]
. nextAction ) ,
textAlign:
TextAlign . center ,
style: TextStyle (
fontSize: 12.0 ,
color: Color (
0xff40ACC9 ) ) )
: Container ( ) ;
} ,
fontSize: 12.0 ) ) ,
)
] ,
) ,
) ,
) ,
] ,
) ,
)
] ,
) ,
Divider (
color: Colors . grey [ 500 ] ,
) ,
) ,
Expanded (
flex: 1 ,
child: InkWell (
onTap: ( ) = > performNextAction (
widget . appoList [ index ] ) ,
child: Container (
margin: EdgeInsets . only ( top: 20.0 ) ,
child: Column (
children: < Widget > [
Image . asset (
getNextActionImage ( widget
Flex (
direction: Axis . horizontal ,
children: < Widget > [
Expanded (
flex: 2 ,
child: Container (
child: Text (
getNextActionDescription ( widget
. appoList [ index ] . nextAction ) ,
width: 50.0 ,
height: 50.0 ) ,
Container (
margin: EdgeInsets . only ( top: 5.0 ) ,
child: Text (
getNextActionText ( widget
. appoList [ index ]
. nextAction ) ,
textAlign: TextAlign . center ,
style:
TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
style: TextStyle (
fontSize: 12.0 ,
color: Colors . grey [ 700 ] ) ) ,
) ,
) ,
) ,
Expanded (
flex: 1 ,
child: GestureDetector (
onTap: ( ) {
navigateToAppointmentDetails (
context ,
widget . appoList [ index ] ) ;
} ,
child: Container (
child: Text (
TranslationBase . of ( context )
. upcomingDetails ,
textAlign: TextAlign . end ,
style: TextStyle (
fontSize: 12.0 ,
color:
new Color ( 0xFF40ACC9 ) ,
decoration: TextDecoration
. underline ) ) ,
) ,
) ,
)
] ,
) ,
)
] ,
) ,
Divider (
color: Colors . grey [ 500 ] ,
] ,
) ,
) ,
Flex (
direction: Axis . horizontal ,
children: < Widget > [
Expanded (
flex: 2 ,
child: Container (
child: Text (
getNextActionDescription (
widget . appoList [ index ] . nextAction ) ,
style: TextStyle (
fontSize: 12.0 ,
color: Colors . grey [ 700 ] ) ) ,
) ,
) ,
Expanded (
flex: 1 ,
child: GestureDetector (
onTap: ( ) {
navigateToAppointmentDetails (
context , widget . appoList [ index ] ) ;
} ,
child: Container (
child: Text (
TranslationBase . of ( context )
. upcomingDetails ,
textAlign: TextAlign . end ,
style: TextStyle (
fontSize: 12.0 ,
color: new Color ( 0xFF40ACC9 ) ,
decoration:
TextDecoration . underline ) ) ,
) ,
) ,
Container (
decoration: BoxDecoration (
borderRadius: BorderRadius . only (
bottomLeft: Radius . circular ( 10.0 ) ,
bottomRight: Radius . circular ( 10.0 ) ) ,
color: Color ( 0xff20bc44 ) ,
) ,
height: 30.0 ,
margin: projectViewModel . isArabic ? EdgeInsets . fromLTRB ( 160.0 , 0.0 , 30.0 , 0.0 ) : EdgeInsets . fromLTRB ( 30.0 , 0.0 , 160.0 , 0.0 ) ,
transform: Matrix4 . translationValues ( 0.0 , - 8.0 , 0.0 ) ,
child: Row (
mainAxisAlignment: MainAxisAlignment . start ,
children: [
widget . appoList [ index ] . isLiveCareAppointment
? Container (
margin: EdgeInsets . fromLTRB (
5.0 , 0.0 , 5.0 , 0.0 ) ,
child: Image . asset (
" assets/images/new-design/video.png " ) ,
)
: Container (
margin: EdgeInsets . fromLTRB (
5.0 , 0.0 , 5.0 , 0.0 ) ,
child: Image . asset (
" assets/images/new-design/walkin.png " ) ,
) ,
) ,
)
] ,
) ,
] ,
widget . appoList [ index ] . isLiveCareAppointment
? Container (
child: Text ( TranslationBase . of ( context ) . videoAppo ,
style: TextStyle (
color: Colors . white ,
fontWeight: FontWeight . bold ,
fontSize: 12.0 ) ) ,
)
: Container (
child: Text ( TranslationBase . of ( context ) . walkinAppo ,
style: TextStyle (
color: Colors . white ,
fontWeight: FontWeight . bold ,
fontSize: 12.0 ) ) ,
)
] ,
) ,
) ,
) ,
] ,
) ,
) ;
} ,
@ -688,7 +760,12 @@ class _ToDoState extends State<ToDo> {
authenticatedUser . firstName ,
authenticatedUser . patientID ,
authenticatedUser ,
widget . browser ) ;
widget . browser ,
appo . isLiveCareAppointment ,
appo . appointmentDate ,
appo . appointmentNo ,
appo . clinicID ,
appo . doctorID ) ;
}
onBrowserLoadStart ( String url ) {