@ -93,6 +93,9 @@ class _ToDoState extends State<ToDo> {
itemBuilder: ( context , index ) {
itemBuilder: ( context , index ) {
return Container (
return Container (
margin: EdgeInsets . all ( 10.0 ) ,
margin: EdgeInsets . all ( 10.0 ) ,
child: Column (
children: [
Container (
child: Card (
child: Card (
margin: EdgeInsets . fromLTRB ( 8.0 , 0.0 , 8.0 , 8.0 ) ,
margin: EdgeInsets . fromLTRB ( 8.0 , 0.0 , 8.0 , 8.0 ) ,
color: Colors . white ,
color: Colors . white ,
@ -113,8 +116,8 @@ class _ToDoState extends State<ToDo> {
width: 20.0 ,
width: 20.0 ,
height: 20.0 ) ,
height: 20.0 ) ,
Container (
Container (
margin:
margin: EdgeInsets . only (
EdgeInsets . only ( left: 10.0 , right: 10.0 ) ,
left: 10.0 , right: 10.0 ) ,
child: Text (
child: Text (
DateUtil . getWeekDayMonthDayYearDateFormatted (
DateUtil . getWeekDayMonthDayYearDateFormatted (
DateUtil . convertStringToDate (
DateUtil . convertStringToDate (
@ -128,27 +131,30 @@ class _ToDoState extends State<ToDo> {
. substring ( 0 , 5 ) ,
. substring ( 0 , 5 ) ,
style: TextStyle ( fontSize: 10.0 ) ) ,
style: TextStyle ( fontSize: 10.0 ) ) ,
) ,
) ,
! widget . appoList [ index ] . isLiveCareAppointment
! widget . appoList [ index ]
. isLiveCareAppointment
? Image . asset (
? Image . asset (
" assets/images/new-design/hospital_address_icon.png " ,
" assets/images/new-design/hospital_address_icon.png " ,
width: 20.0 ,
width: 20.0 ,
height: 20.0 )
height: 20.0 )
: Container ( ) ,
: Container ( ) ,
Container (
Container (
margin:
margin: EdgeInsets . only (
EdgeInsets . only ( left: 5.0 , right: 5.0 ) ,
left: 5.0 , right: 5.0 ) ,
child: widget
child: widget . appoList [ index ]
. appoList [ index ] . isLiveCareAppointment
. isLiveCareAppointment
? Container ( )
? Container ( )
: Text (
: Text (
widget . appoList [ index ] . projectName ! =
widget . appoList [ index ]
. projectName ! =
null
null
? widget
? widget . appoList [ index ]
. appoList [ index ] . projectName
. projectName
: " - " ,
: " - " ,
overflow: TextOverflow . clip ,
overflow: TextOverflow . clip ,
maxLines: 2 ,
maxLines: 2 ,
style: TextStyle ( fontSize: 10.0 ) ) ,
style:
TextStyle ( fontSize: 10.0 ) ) ,
) ,
) ,
] ,
] ,
) ,
) ,
@ -164,14 +170,17 @@ class _ToDoState extends State<ToDo> {
Expanded (
Expanded (
flex: 1 ,
flex: 1 ,
child: Container (
child: Container (
height: MediaQuery . of ( context ) . size . height *
height: MediaQuery . of ( context )
. size
. height *
0.1 ,
0.1 ,
margin: EdgeInsets . only ( top: 5.0 ) ,
margin: EdgeInsets . only ( top: 5.0 ) ,
child: ClipRRect (
child: ClipRRect (
borderRadius:
borderRadius:
BorderRadius . circular ( 100.0 ) ,
BorderRadius . circular ( 100.0 ) ,
child: Image . network (
child: Image . network (
widget . appoList [ index ] . doctorImageURL ,
widget . appoList [ index ]
. doctorImageURL ,
fit: BoxFit . fill ) ,
fit: BoxFit . fill ) ,
) ,
) ,
) ,
) ,
@ -180,20 +189,24 @@ class _ToDoState extends State<ToDo> {
flex: 3 ,
flex: 3 ,
child: Container (
child: Container (
margin: EdgeInsets . only (
margin: EdgeInsets . only (
top: 10.0 , left: 20.0 , right: 20.0 ) ,
top: 10.0 ,
left: 20.0 ,
right: 20.0 ) ,
child: Column (
child: Column (
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment . start ,
CrossAxisAlignment . start ,
children: < Widget > [
children: < Widget > [
Text (
Text (
widget . appoList [ index ] . doctorTitle +
widget . appoList [ index ]
. doctorTitle +
" " +
" " +
widget . appoList [ index ]
widget . appoList [ index ]
. doctorNameObj ,
. doctorNameObj ,
style: TextStyle (
style: TextStyle (
fontSize: 14.0 ,
fontSize: 14.0 ,
color: Colors . black ,
color: Colors . black ,
fontWeight: FontWeight . bold ,
fontWeight:
FontWeight . bold ,
letterSpacing: 1.0 ) ) ,
letterSpacing: 1.0 ) ) ,
Container (
Container (
margin: EdgeInsets . only (
margin: EdgeInsets . only (
@ -210,7 +223,8 @@ class _ToDoState extends State<ToDo> {
) ,
) ,
Row (
Row (
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment . spaceBetween ,
MainAxisAlignment
. spaceBetween ,
mainAxisSize: MainAxisSize . max ,
mainAxisSize: MainAxisSize . max ,
children: < Widget > [
children: < Widget > [
RatingBar . readOnly (
RatingBar . readOnly (
@ -219,10 +233,13 @@ class _ToDoState extends State<ToDo> {
. actualDoctorRate
. actualDoctorRate
. toDouble ( ) ,
. toDouble ( ) ,
size: 20.0 ,
size: 20.0 ,
filledColor: Colors . yellow [ 700 ] ,
filledColor:
emptyColor: Colors . grey [ 500 ] ,
Colors . yellow [ 700 ] ,
emptyColor:
Colors . grey [ 500 ] ,
isHalfAllowed: true ,
isHalfAllowed: true ,
halfFilledIcon: Icons . star_half ,
halfFilledIcon:
Icons . star_half ,
filledIcon: Icons . star ,
filledIcon: Icons . star ,
emptyIcon: Icons . star ,
emptyIcon: Icons . star ,
) ,
) ,
@ -233,12 +250,15 @@ class _ToDoState extends State<ToDo> {
controller: new CountdownTimerController (
controller: new CountdownTimerController (
endTime: DateTime . now ( )
endTime: DateTime . now ( )
. millisecondsSinceEpoch +
. millisecondsSinceEpoch +
( widget . appoList [ index ]
( widget
. appoList [
index ]
. remaniningHoursTocanPay *
. remaniningHoursTocanPay *
1000 ) *
1000 ) *
60 ) ,
60 ) ,
widgetBuilder:
widgetBuilder: ( _ ,
( _ , CurrentRemainingTime time ) {
CurrentRemainingTime
time ) {
return time ! = null
return time ! = null
? Text (
? Text (
' ${ time . days ! = null ? time . days : " 0 " } : ${ time . hours . toString ( ) . length = = 1 ? " 0 " + time . hours . toString ( ) : time . hours } : ${ time . min } : ${ time . sec } ' +
' ${ time . days ! = null ? time . days : " 0 " } : ${ time . hours . toString ( ) . length = = 1 ? " 0 " + time . hours . toString ( ) : time . hours } : ${ time . min } : ${ time . sec } ' +
@ -268,18 +288,21 @@ class _ToDoState extends State<ToDo> {
children: < Widget > [
children: < Widget > [
Image . asset (
Image . asset (
getNextActionImage ( widget
getNextActionImage ( widget
. appoList [ index ] . nextAction ) ,
. appoList [ index ]
. nextAction ) ,
width: 50.0 ,
width: 50.0 ,
height: 50.0 ) ,
height: 50.0 ) ,
Container (
Container (
margin: EdgeInsets . only ( top: 5.0 ) ,
margin:
EdgeInsets . only ( top: 5.0 ) ,
child: Text (
child: Text (
getNextActionText ( widget
getNextActionText ( widget
. appoList [ index ]
. appoList [ index ]
. nextAction ) ,
. nextAction ) ,
textAlign: TextAlign . center ,
textAlign:
style:
TextAlign . center ,
TextStyle ( fontSize: 12.0 ) ) ,
style: TextStyle (
fontSize: 12.0 ) ) ,
)
)
] ,
] ,
) ,
) ,
@ -298,8 +321,8 @@ class _ToDoState extends State<ToDo> {
flex: 2 ,
flex: 2 ,
child: Container (
child: Container (
child: Text (
child: Text (
getNextActionDescription (
getNextActionDescription ( widget
widget . appoList [ index ] . nextAction ) ,
. appoList [ index ] . nextAction ) ,
style: TextStyle (
style: TextStyle (
fontSize: 12.0 ,
fontSize: 12.0 ,
color: Colors . grey [ 700 ] ) ) ,
color: Colors . grey [ 700 ] ) ) ,
@ -310,7 +333,8 @@ class _ToDoState extends State<ToDo> {
child: GestureDetector (
child: GestureDetector (
onTap: ( ) {
onTap: ( ) {
navigateToAppointmentDetails (
navigateToAppointmentDetails (
context , widget . appoList [ index ] ) ;
context ,
widget . appoList [ index ] ) ;
} ,
} ,
child: Container (
child: Container (
child: Text (
child: Text (
@ -319,9 +343,10 @@ class _ToDoState extends State<ToDo> {
textAlign: TextAlign . end ,
textAlign: TextAlign . end ,
style: TextStyle (
style: TextStyle (
fontSize: 12.0 ,
fontSize: 12.0 ,
color: new Color ( 0xFF40ACC9 ) ,
color:
decoration:
new Color ( 0xFF40ACC9 ) ,
TextDecoration . underline ) ) ,
decoration: TextDecoration
. underline ) ) ,
) ,
) ,
) ,
) ,
)
)
@ -331,6 +356,53 @@ class _ToDoState extends State<ToDo> {
) ,
) ,
) ,
) ,
) ,
) ,
) ,
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 . firstName ,
authenticatedUser . patientID ,
authenticatedUser . patientID ,
authenticatedUser ,
authenticatedUser ,
widget . browser ) ;
widget . browser ,
appo . isLiveCareAppointment ,
appo . appointmentDate ,
appo . appointmentNo ,
appo . clinicID ,
appo . doctorID ) ;
}
}
onBrowserLoadStart ( String url ) {
onBrowserLoadStart ( String url ) {