@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import ' package:diplomaticquarterapp/uitl/ProgressDialog.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_toast.dart ' ;
import ' package:diplomaticquarterapp/uitl/date_uitl.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/widgets/buttons/secondary_button.dart ' ;
import ' package:diplomaticquarterapp/widgets/data_display/text.dart ' ;
import ' package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart ' ;
@ -78,7 +79,7 @@ class _PickupLocationState extends State<PickupLocation> {
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Texts ( ' Pickup Location ' ) ,
Texts ( TranslationBase . of ( context ) . pickupLocation ) ,
SizedBox (
height: 15 ,
) ,
@ -110,7 +111,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
Texts ( getSelectFromMapName ( ) ) ,
Texts ( getSelectFromMapName ( context ) ) ,
Icon (
FontAwesomeIcons . mapMarkerAlt ,
size: 24 ,
@ -123,7 +124,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox (
height: 12 ,
) ,
Texts ( ' Pickup Spot ' ) ,
Texts ( TranslationBase . of ( context ) . pickupSpot ) ,
SizedBox (
height: 5 ,
) ,
@ -141,7 +142,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors . white ,
) ,
child: ListTile (
title: Texts ( ' Inside Home ' ) ,
title: Texts ( TranslationBase . of ( context ) . insideHome ) ,
leading: Checkbox (
activeColor: Colors . red [ 800 ] ,
value: _isInsideHome ,
@ -157,7 +158,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox (
height: 12 ,
) ,
Texts ( ' Do you have an appointment ? ' ) ,
Texts ( TranslationBase . of ( context ) . haveAppo ) ,
SizedBox (
height: 5 ,
) ,
@ -182,7 +183,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors . white ,
) ,
child: ListTile (
title: Text ( ' Yes ' ) ,
title: Text s( TranslationBase . of ( context ) . yes ) ,
leading: Radio (
value: HaveAppointment . YES ,
groupValue: _haveAppointment ,
@ -217,7 +218,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors . white ,
) ,
child: ListTile (
title: Text ( ' No ' ) ,
title: Text s( TranslationBase . of ( context ) . no ) ,
leading: Radio (
value: HaveAppointment . NO ,
groupValue: _haveAppointment ,
@ -250,7 +251,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox (
height: 12 ,
) ,
Texts ( ' Drop off Location ' ) ,
Texts ( TranslationBase . of ( context ) . dropoffLocation ) ,
SizedBox (
height: 8 ,
) ,
@ -270,7 +271,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
Texts ( getHospitalName ( ' Pickup Location ' ) ) ,
Texts ( getHospitalName ( TranslationBase . of ( context ) . pickupLocation ) ) ,
Icon (
Icons . arrow_drop_down ,
size: 24 ,
@ -286,7 +287,7 @@ class _PickupLocationState extends State<PickupLocation> {
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Texts ( ' Pickup Location ' ) ,
Texts ( TranslationBase . of ( context ) . pickupLocation ) ,
SizedBox (
height: 15 ,
) ,
@ -306,7 +307,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
Texts ( getHospitalName ( ' Pickup Location ' ) ) ,
Texts ( getHospitalName ( TranslationBase . of ( context ) . pickupLocation ) ) ,
Icon (
Icons . arrow_drop_down ,
size: 24 ,
@ -319,7 +320,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox (
height: 12 ,
) ,
Texts ( ' Drop off Location ' ) ,
Texts ( TranslationBase . of ( context ) . dropoffLocation ) ,
SizedBox (
height: 8 ,
) ,
@ -351,7 +352,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
Texts ( getSelectFromMapName ( ) ) ,
Texts ( getSelectFromMapName ( context ) ) ,
Icon (
FontAwesomeIcons . mapMarkerAlt ,
size: 24 ,
@ -377,7 +378,7 @@ class _PickupLocationState extends State<PickupLocation> {
onTap: ( ) {
if ( _result = = null | | _selectedHospital = = null )
AppToast . showErrorToast (
message: ' please select all fields ' ) ;
message: TranslationBase . of ( context ) . selectAll ) ;
else
setState ( ( ) {
widget . patientER . pickupSpot = _isInsideHome ? 1 : 0 ;
@ -427,7 +428,7 @@ class _PickupLocationState extends State<PickupLocation> {
widget . changeCurrentTab ( 2 ) ;
} ) ;
} ,
label: ' Next ' ,
label: TranslationBase . of ( context ) . next ,
) ,
)
] ,
@ -455,8 +456,8 @@ class _PickupLocationState extends State<PickupLocation> {
return _selectedHospital = = null ? title : _selectedHospital . name ;
}
String getSelectFromMapName ( ) {
return _result ! = null ? _result . formattedAddress : ' Select From Map ' ;
String getSelectFromMapName ( context ) {
return _result ! = null ? _result . formattedAddress : TranslationBase . of ( context ) . selectMap ;
}
getAppointment ( ) {
@ -494,7 +495,7 @@ class _PickupLocationState extends State<PickupLocation> {
setState ( ( ) {
_haveAppointment = HaveAppointment . NO ;
} ) ;
AppToast . showErrorToast ( message: ' You don \' t have any appointment ' ) ;
AppToast . showErrorToast ( message: TranslationBase . of ( context ) . noAppointment ) ;
}
} ) . catchError ( ( e ) {
ProgressDialogUtil . hideProgressDialog ( context ) ;