Ambulance Service second step

er_location
Mohammad Aljammal 5 years ago
parent 3d6eafe473
commit 1ce55e687f

@ -27,7 +27,7 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -41,7 +41,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cloud.diplomaticquarterapp"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true

@ -17,6 +17,9 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<application
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
@ -69,6 +72,9 @@
android:name="flutterEmbedding"
android:value="2" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCiD4YqVqLNYbt8-htvFy4Wp8XSph9E3wM"/>
</application>
<uses-permission android:name="android.permission.INTERNET" />

@ -2,4 +2,4 @@
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4608m
org.gradle.jvmargs=-Xmx4608m

@ -0,0 +1,27 @@
import 'package:flutter/cupertino.dart';
enum Ambulate { Wheelchair, Walker, Stretcher, None }
extension SelectedAmbulate on Ambulate {
String getAmbulateTitle(BuildContext context) {
switch (this) {
case Ambulate.Wheelchair:
// TODO: Handle this case.
return 'Wheelchair';
break;
case Ambulate.Walker:
// TODO: Handle this case.
return 'Walker';
break;
case Ambulate.Stretcher:
// TODO: Handle this case.
return 'Stretcher';
break;
case Ambulate.None:
// TODO: Handle this case.
return 'None';
break;
}
return 'None';
}
}

@ -1,3 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'get_all_transportation_method_list_model.dart';
class PatientER {
double versionID;
int channel;
@ -46,7 +50,8 @@ class PatientER {
dynamic appointmentDoctorName;
dynamic appointmentBranch;
dynamic appointmentTime;
PatientERTransportationMethod patientERTransportationMethod;
Ambulate ambulate;
PatientER(
{this.versionID,
this.channel,
@ -94,7 +99,9 @@ class PatientER {
this.appointmentClinicName,
this.appointmentDoctorName,
this.appointmentBranch,
this.appointmentTime});
this.appointmentTime,
this.patientERTransportationMethod,
this.ambulate});
PatientER.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];

@ -5,9 +5,14 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
class MedicalService extends BaseService {
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList = List();
getAppointmentHistory() async {
getAppointmentHistory({bool isActiveAppointment = false}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
if(isActiveAppointment) {
body['IsActiveAppointment'] = true;
body['isDentalAllowedBackend'] = false;
}
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY,
onSuccess: (response, statusCode) async {
@ -19,6 +24,6 @@ class MedicalService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}, body: body);
}
}

@ -3,19 +3,36 @@ import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/service/er/am_service.dart';
import 'package:diplomaticquarterapp/core/service/hospital_service.dart';
import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import '../base_view_model.dart';
import '../../../locator.dart';
class AmRequestViewModel extends BaseViewModel {
AmService _amService = locator<AmService>();
HospitalService _hospitalService = locator<HospitalService>();
MedicalService _medicalService = locator<MedicalService>();
List<PatientERTransportationMethod>
get amRequestModeList => _amService.amModelList;
List<PatientAllPresOrders> get patientAllPresOrdersList =>_amService.patientAllPresOrdersList;
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
_medicalService.appoitmentAllHistoryResultList;
Future getAppointmentHistory() async {
setState(ViewState.BusyLocal);
await _medicalService.getAppointmentHistory(isActiveAppointment: true);
if (_medicalService.hasError) {
error = _medicalService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future getAmRequestOrders() async {
setState(ViewState.Busy);

@ -0,0 +1,45 @@
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class AvailableAppointmentsPage extends StatelessWidget {
final List<AppoitmentAllHistoryResultList> appointmentsAllHistoryList;
const AvailableAppointmentsPage({Key key, this.appointmentsAllHistoryList})
: super(key: key);
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Available Appointments',
body: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts('Available Appointments'),
SizedBox(
height: 12,
),
...List.generate(
appointmentsAllHistoryList.length,
(index) => InkWell(
onTap: (){
Navigator.pop(context, appointmentsAllHistoryList[index]);
},
child: AppointmentCard(appointment: appointmentsAllHistoryList[index],),
),
)
],
),
),
),
);
}
}

@ -1,41 +1,334 @@
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class BillAmount extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final AmRequestViewModel amRequestViewModel;
BillAmount({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel});
BillAmount(
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
@override
_BillAmountState createState() => _BillAmountState();
}
class _BillAmountState extends State<BillAmount> {
Ambulate _ambulate = Ambulate.None;
String note ="";
@override
Widget build(BuildContext context) {
return Column(
children: [
Texts('BillAmount 3'),
SizedBox(height: 45,),
Container(
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 76,
child:SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: ()=> widget.changeCurrentTab(3),
label: 'Next',
return SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
margin: EdgeInsets.only(left: 12, right: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Bill Amount '),
SizedBox(
height: 10,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
outside: BorderSide(width: 1.0, color: Colors.grey[300])),
children: [
TableRow(
children: [
Container(
height: MediaQuery.of(context).size.height * 0.09,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Amount before tax: ',
textAlign: TextAlign.start,
color: Colors.black,
fontSize: 15,
),
),
),
Container(
height: MediaQuery.of(context).size.height * 0.09,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.price}',
color: Colors.black,
textAlign: TextAlign.start,
fontSize: 15,
),
),
),
],
),
TableRow(
children: [
Container(
color: Colors.white,
height: MediaQuery.of(context).size.height * 0.09,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Tax amount :',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
),
),
),
Container(
height: MediaQuery.of(context).size.height * 0.09,
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.vAT}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
),
),
),
],
),
TableRow(
children: [
Container(
height: MediaQuery.of(context).size.height * 0.09,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(10.0),
),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Total amount payable',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
bold: true,
),
),
),
Container(
height: MediaQuery.of(context).size.height * 0.09,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10.0),
),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.totalPrice}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
),
),
),
],
),
],
),
SizedBox(
height: 10,
),
Texts('Select Ambulate',bold: true,),
SizedBox(height: 5,),
Row(
children: [
Expanded(
child: InkWell(
onTap: () {
setState(() {
_ambulate = Ambulate.Wheelchair;
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
title: Text('Wheelchair'),
leading: Radio(
value: Ambulate.Wheelchair,
groupValue: _ambulate,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_ambulate = value;
});
},
),
),
),
),
),
Expanded(
child: InkWell(
onTap: () {
setState(() {
_ambulate = Ambulate.Walker;
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
title: Text('Walker'),
leading: Radio(
value: Ambulate.Walker,
groupValue: _ambulate,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_ambulate = value;
});
},
),
),
),
),
),
],
),
SizedBox(height: 5,),
Row(
children: [
Expanded(
child: InkWell(
onTap: () {
setState(() {
_ambulate = Ambulate.Stretcher;
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
title: Text('Stretcher'),
leading: Radio(
value: Ambulate.Stretcher,
groupValue: _ambulate,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_ambulate = value;
});
},
),
),
),
),
),
Expanded(
child: InkWell(
onTap: () {
setState(() {
_ambulate = Ambulate.None;
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
title: Text('Walker'),
leading: Radio(
value: Ambulate.None,
groupValue: _ambulate,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_ambulate = value;
});
},
),
),
),
),
),
],
),
SizedBox(height: 12,),
NewTextFields(
hintText: 'Note',
initialValue: note,
onChanged: (value){
setState(() {
note = value;
});
},
),
),
)
],
SizedBox(
height: 15,
),
Container(
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 76,
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientER.ambulate = _ambulate;
widget.patientER.requesterNote = note;
widget.changeCurrentTab(3);
});
},
label: 'Next',
),
)
],
),
),
);
}
}

@ -1,16 +1,29 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'AmbulanceReq.dart';
import 'AvailableAppointmentsPage.dart';
enum HaveAppointment { YES, NO }
class PickupLocation extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final AmRequestViewModel amRequestViewModel;
PickupLocation(
{Key key,
@ -18,8 +31,6 @@ class PickupLocation extends StatefulWidget {
this.patientER,
this.amRequestViewModel});
final AmRequestViewModel amRequestViewModel;
@override
_PickupLocationState createState() => _PickupLocationState();
}
@ -27,6 +38,26 @@ class PickupLocation extends StatefulWidget {
class _PickupLocationState extends State<PickupLocation> {
bool _isInsideHome = false;
HaveAppointment _haveAppointment = HaveAppointment.NO;
double _latitude;
double _longitude;
AppoitmentAllHistoryResultList myAppointment;
@override
void initState() {
super.initState();
_getCurrentLocation();
}
_getCurrentLocation() async {
await getLastKnownPosition().then((value) {
_latitude = value.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;
_latitude = 0;
});
// currentLocation = LatLng(position.latitude, position.longitude);
}
@override
Widget build(BuildContext context) {
@ -111,9 +142,12 @@ class _PickupLocationState extends State<PickupLocation> {
Expanded(
child: InkWell(
onTap: () {
setState(() {
_haveAppointment = HaveAppointment.YES;
});
if(myAppointment == null) {
getAppointment();
setState(() {
_haveAppointment = HaveAppointment.YES;
});
}
},
child: Container(
decoration: BoxDecoration(
@ -130,9 +164,13 @@ class _PickupLocationState extends State<PickupLocation> {
groupValue: _haveAppointment,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_haveAppointment = value;
});
if(myAppointment == null) {
getAppointment();
setState(() {
_haveAppointment = value;
});
}
},
),
),
@ -144,6 +182,7 @@ class _PickupLocationState extends State<PickupLocation> {
onTap: () {
setState(() {
_haveAppointment = HaveAppointment.NO;
myAppointment = null;
});
},
child: Container(
@ -163,6 +202,7 @@ class _PickupLocationState extends State<PickupLocation> {
onChanged: (value) {
setState(() {
_haveAppointment = value;
myAppointment = null;
});
},
),
@ -172,6 +212,18 @@ class _PickupLocationState extends State<PickupLocation> {
),
],
),
if(myAppointment!=null)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
AppointmentCard(appointment: myAppointment,)
],
),
SizedBox(
height: 12,
),
@ -209,24 +261,43 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 15,
),
Container(
padding: EdgeInsets.all(12),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts('Pickup Location'),
Icon(
Icons.arrow_drop_down,
size: 24,
color: Colors.black,
)
],
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PlacePicker(
apiKey: 'AIzaSyCiD4YqVqLNYbt8-htvFy4Wp8XSph9E3wM',
// Put YOUR OWN KEY here.
onPlacePicked: (PickResult result) {
print(result.adrAddress);
Navigator.of(context).pop();
},
initialPosition: LatLng(_latitude, _longitude),
useCurrentLocation: true,
),
),
);
},
child: Container(
padding: EdgeInsets.all(12),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts('Pickup Location'),
Icon(
Icons.arrow_drop_down,
size: 24,
color: Colors.black,
)
],
),
),
),
SizedBox(
@ -270,7 +341,12 @@ class _PickupLocationState extends State<PickupLocation> {
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () => widget.changeCurrentTab(2),
onTap: () {
setState(() {
widget.patientER.pickupSpot = _isInsideHome ? 1 : 0;
widget.changeCurrentTab(2);
});
},
label: 'Next',
),
)
@ -279,4 +355,37 @@ class _PickupLocationState extends State<PickupLocation> {
),
);
}
getAppointment() {
widget.amRequestViewModel.getAppointmentHistory().then((value) {
if (widget.amRequestViewModel.state == ViewState.Error ||
widget.amRequestViewModel.state == ViewState.ErrorLocal) {
AppToast.showErrorToast(message: widget.amRequestViewModel.error);
} else if (widget.amRequestViewModel.appoitmentAllHistoryResultList.length > 0) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AvailableAppointmentsPage(
appointmentsAllHistoryList:
widget.amRequestViewModel.appoitmentAllHistoryResultList,
),
),
).then((value) {
if (value != null)
setState(() {
myAppointment = value;
});
else
setState(() {
_haveAppointment = HaveAppointment.NO;
});
});
} else {
setState(() {
_haveAppointment = HaveAppointment.NO;
});
AppToast.showErrorToast(message: 'You don\'t have any appointment');
}
});
}
}

@ -42,6 +42,10 @@ class _SelectTransportationMethodState
_way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays;
_erTransportationMethod = widget.amRequestViewModel
.amRequestModeList[(widget.patientER.selectedAmbulate - 1)];
} else {
if (widget.amRequestViewModel.amRequestModeList.length != 0)
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[
widget.amRequestViewModel.amRequestModeList.length - 1];
}
}
@ -281,6 +285,8 @@ class _SelectTransportationMethodState
.amRequestViewModel.amRequestModeList
.indexOf(_erTransportationMethod) +
1);
widget.patientER.patientERTransportationMethod =
_erTransportationMethod;
widget.changeCurrentTab(1);
});
},

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
class Summary extends StatefulWidget {
final Function changeCurrentTab;
@ -19,23 +20,86 @@ class Summary extends StatefulWidget {
class _SummaryState extends State<Summary> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Texts('Summary 4'),
SizedBox(height: 45,),
Container(
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 76,
child:SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
label: 'Next',
// onTap: ()=> widget.changeCurrentTab(2),
),
)
],
return SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 12, right: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Summary'),
SizedBox(height: 5,),
Container(
width: double.infinity,
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Transportation Method',color: Colors.grey,),
Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,),
SizedBox(height: 8,),
Texts('Direction',color: Colors.grey,),
Texts('From Hospital',bold: true,),
SizedBox(height: 8,),
Texts('Pickup Location',color: Colors.grey,),
Texts('SZR Medical Center',bold: true,),
SizedBox(height: 8,),
Texts('Drop off location',color: Colors.grey,),
Texts('6199, Al Ameen wlfn nif',bold: true,),
SizedBox(height: 8,),
Texts('Select Ambulate',color: Colors.grey,),
Texts('${widget.patientER.ambulate.getAmbulateTitle(context)}',bold: true,),
SizedBox(height: 8,),
Texts('Note',color: Colors.grey,),
Texts('${widget.patientER.requesterNote?? '---'}',bold: true,),
SizedBox(height: 8,),
],
),
),
SizedBox(height: 20,),
Texts('Bill Amount',textAlign: TextAlign.start,),
SizedBox(height: 5,),
Container(
height: 55,
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts('Total amount payable:'),
Texts('SR ${widget.patientER.patientERTransportationMethod.totalPrice}')
],
),
),
SizedBox(height: 45,),
Container(
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 76,
child:SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
label: 'Next',
// onTap: ()=> widget.changeCurrentTab(2),
),
)
],
),
),
);
}
}

@ -0,0 +1,47 @@
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class AppointmentCard extends StatelessWidget {
final AppoitmentAllHistoryResultList appointment;
const AppointmentCard({Key key, this.appointment}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
LargeAvatar(
url: appointment.doctorImageURL,
name: appointment.doctorNameObj,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(appointment.doctorNameObj,bold: true,),
SizedBox(height: 4,),
Texts(appointment.projectName),
Texts(appointment.clinicName),
Texts(DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointment.bookDate))),
],
),
),
)
],
),
);
}
}

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class StepsWidget extends StatelessWidget {
final int index;
@ -10,7 +12,8 @@ class StepsWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Stack(
ProjectViewModel projectViewModel = Provider.of(context);
return projectViewModel.isArabic? Stack(
children: [
Container(
height: 50,
@ -114,6 +117,110 @@ class StepsWidget extends StatelessWidget {
),
),
],
):Stack(
children: [
Container(
height: 50,
width: MediaQuery.of(context).size.width,
color: Colors.transparent,
child: Center(
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
),
),
Positioned(
top: 10,
right: 0,
child: InkWell(
onTap: () => changeCurrentTab(0),
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle,
color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white,
),
child: Center(
child: Texts(
'1',
color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800],
),
),
),
),
),
Positioned(
top: 10,
right: MediaQuery.of(context).size.width * 0.3,
child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle,
color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
),
child: Center(
child: Texts(
'2',
color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
),
),
),
),
),
Positioned(
top: 10,
right: MediaQuery.of(context).size.width * 0.6,
child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: index > 2 ? null:Border.all(color: Colors.black,width: 0.75),
color: index == 2 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
),
child: Center(
child: Texts(
'3',
color: index == 2? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
),
),
),
),
),
Positioned(
top: 10,
left: 0,
child: InkWell(
onTap: () => index == 2 ?changeCurrentTab(3):null,
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
border: Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle,
color: index == 3 ? Colors.grey[800] : Colors.white,
),
child: Center(
child: Texts(
'4',
color: index == 3 ? Colors.white : Colors.grey[800],
),
),
),
),
),
],
);
}
}

@ -0,0 +1,12 @@
import 'package:flutter/material.dart';
class ProgressDialogUtil{
static AlertDialog alert = AlertDialog(
content: new Row(
children: [
CircularProgressIndicator(),
Container(margin: EdgeInsets.only(left: 7),child:Text("Loading..." )),
],),
);
}

@ -5,7 +5,7 @@ description: A new Flutter application.
version: 1.0.0+1
environment:
sdk: ">=2.2.2 <3.0.0"
sdk: ">=2.6.0 <3.0.0"
dependencies:
flutter:
@ -128,6 +128,10 @@ dependencies:
#Handle Geolocation
geolocator: ^6.0.0+1
#google maps places
google_maps_place_picker: ^0.10.0
#Dependencies for video call implementation
native_device_orientation: ^0.3.0
enum_to_string: ^1.0.9

Loading…
Cancel
Save