Ambulance Service steps

merge-update-with-lab-changes
Mohammad Aljammal 6 years ago
parent f543126152
commit c7d396875e

@ -0,0 +1,200 @@
class PatientER {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int orderServiceID;
String patientIdentificationID;
int direction;
bool haveAppointment;
int tripType;
int pickupUrgency;
int pickupSpot;
String pickupDateTime;
int transportationMethodId;
int selectedAmbulate;
String requesterNote;
int requesterFileNo;
String requesterMobileNo;
bool requesterIsOutSA;
int isOutPatient;
String pickupLocationName;
String dropoffLocationName;
int projectID;
int createdBy;
int lineItemNo;
int cost;
double vAT;
double totalPrice;
String pickupLocationLattitude;
String pickupLocationLongitude;
String dropoffLocationLattitude;
String dropoffLocationLongitude;
String latitude;
String longitude;
String appointmentNo;
dynamic appointmentClinicName;
dynamic appointmentDoctorName;
dynamic appointmentBranch;
dynamic appointmentTime;
PatientER(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.orderServiceID = 4,
this.patientIdentificationID,
this.direction,
this.haveAppointment,
this.tripType,
this.pickupUrgency,
this.pickupSpot,
this.pickupDateTime,
this.transportationMethodId,
this.selectedAmbulate,
this.requesterNote,
this.requesterFileNo,
this.requesterMobileNo,
this.requesterIsOutSA,
this.isOutPatient,
this.pickupLocationName,
this.dropoffLocationName,
this.projectID,
this.createdBy,
this.lineItemNo,
this.cost,
this.vAT,
this.totalPrice,
this.pickupLocationLattitude,
this.pickupLocationLongitude,
this.dropoffLocationLattitude,
this.dropoffLocationLongitude,
this.latitude,
this.longitude,
this.appointmentNo,
this.appointmentClinicName,
this.appointmentDoctorName,
this.appointmentBranch,
this.appointmentTime});
PatientER.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
orderServiceID = json['OrderServiceID'];
patientIdentificationID = json['PatientIdentificationID'];
direction = json['Direction'];
haveAppointment = json['HaveAppointment'];
tripType = json['TripType'];
pickupUrgency = json['PickupUrgency'];
pickupSpot = json['PickupSpot'];
pickupDateTime = json['PickupDateTime'];
transportationMethodId = json['TransportationMethodId'];
selectedAmbulate = json['SelectedAmbulate'];
requesterNote = json['RequesterNote'];
requesterFileNo = json['RequesterFileNo'];
requesterMobileNo = json['RequesterMobileNo'];
requesterIsOutSA = json['RequesterIsOutSA'];
isOutPatient = json['IsOutPatient'];
pickupLocationName = json['PickupLocationName'];
dropoffLocationName = json['DropoffLocationName'];
projectID = json['ProjectID'];
createdBy = json['CreatedBy'];
lineItemNo = json['LineItemNo'];
cost = json['Cost'];
vAT = json['VAT'];
totalPrice = json['TotalPrice'];
pickupLocationLattitude = json['PickupLocationLattitude'];
pickupLocationLongitude = json['PickupLocationLongitude'];
dropoffLocationLattitude = json['DropoffLocationLattitude'];
dropoffLocationLongitude = json['DropoffLocationLongitude'];
latitude = json['Latitude'];
longitude = json['Longitude'];
appointmentNo = json['AppointmentNo'];
appointmentClinicName = json['AppointmentClinicName'];
appointmentDoctorName = json['AppointmentDoctorName'];
appointmentBranch = json['AppointmentBranch'];
appointmentTime = json['AppointmentTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['OrderServiceID'] = this.orderServiceID;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['Direction'] = this.direction;
data['HaveAppointment'] = this.haveAppointment;
data['TripType'] = this.tripType;
data['PickupUrgency'] = this.pickupUrgency;
data['PickupSpot'] = this.pickupSpot;
data['PickupDateTime'] = this.pickupDateTime;
data['TransportationMethodId'] = this.transportationMethodId;
data['SelectedAmbulate'] = this.selectedAmbulate;
data['RequesterNote'] = this.requesterNote;
data['RequesterFileNo'] = this.requesterFileNo;
data['RequesterMobileNo'] = this.requesterMobileNo;
data['RequesterIsOutSA'] = this.requesterIsOutSA;
data['IsOutPatient'] = this.isOutPatient;
data['PickupLocationName'] = this.pickupLocationName;
data['DropoffLocationName'] = this.dropoffLocationName;
data['ProjectID'] = this.projectID;
data['CreatedBy'] = this.createdBy;
data['LineItemNo'] = this.lineItemNo;
data['Cost'] = this.cost;
data['VAT'] = this.vAT;
data['TotalPrice'] = this.totalPrice;
data['PickupLocationLattitude'] = this.pickupLocationLattitude;
data['PickupLocationLongitude'] = this.pickupLocationLongitude;
data['DropoffLocationLattitude'] = this.dropoffLocationLattitude;
data['DropoffLocationLongitude'] = this.dropoffLocationLongitude;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentClinicName'] = this.appointmentClinicName;
data['AppointmentDoctorName'] = this.appointmentDoctorName;
data['AppointmentBranch'] = this.appointmentBranch;
data['AppointmentTime'] = this.appointmentTime;
return data;
}
}

@ -1,5 +1,5 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PatientER_RRT_GetAllTransportationMethodListModel { class PatientERTransportationMethod {
int id; int id;
DateTime createDate; DateTime createDate;
DateTime lastEditDate; DateTime lastEditDate;
@ -9,15 +9,15 @@ class PatientER_RRT_GetAllTransportationMethodListModel {
String title; String title;
String titleAR; String titleAR;
int price; int price;
Null isDefault; dynamic isDefault;
int visibility; int visibility;
Null durationId; dynamic durationId;
String description; String description;
String descriptionAR; String descriptionAR;
int totalPrice; int totalPrice;
int vAT; int vAT;
PatientER_RRT_GetAllTransportationMethodListModel( PatientERTransportationMethod(
{ {
this.id, this.id,
this.createDate, this.createDate,
@ -36,7 +36,7 @@ class PatientER_RRT_GetAllTransportationMethodListModel {
this.totalPrice, this.totalPrice,
this.vAT}); this.vAT});
PatientER_RRT_GetAllTransportationMethodListModel.fromJson( PatientERTransportationMethod.fromJson(
Map<String, dynamic> json) { Map<String, dynamic> json) {
id = json['Id']; id = json['Id'];
createDate = DateUtil.convertStringToDate(json['CreateDate']); createDate = DateUtil.convertStringToDate(json['CreateDate']);

@ -5,17 +5,20 @@ import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method
import '../base_service.dart'; import '../base_service.dart';
class AmService extends BaseService { class AmService extends BaseService {
List<PatientER_RRT_GetAllTransportationMethodListModel> amModelList = List(); List<PatientERTransportationMethod> amModelList = List();
List<PatientAllPresOrders> patientAllPresOrdersList = List(); List<PatientAllPresOrders> patientAllPresOrdersList = List();
Future getAllTransportationOrders() async { Future getAllTransportationOrders() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend']= false;
body['IdentificationNo'] = user.patientIdentificationNo;
await baseAppClient.post(GET_AMBULANCE_REQUEST, await baseAppClient.post(GET_AMBULANCE_REQUEST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
amModelList.clear(); amModelList.clear();
response['AmModelList'].forEach((vital) { response['AmModelList'].forEach((vital) {
amModelList.add( amModelList.add(
PatientER_RRT_GetAllTransportationMethodListModel.fromJson(vital)); PatientERTransportationMethod.fromJson(vital));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -11,7 +11,7 @@ class AmRequestViewModel extends BaseViewModel {
AmService _amService = locator<AmService>(); AmService _amService = locator<AmService>();
HospitalService _hospitalService = locator<HospitalService>(); HospitalService _hospitalService = locator<HospitalService>();
List<PatientER_RRT_GetAllTransportationMethodListModel> List<PatientERTransportationMethod>
get amRequestModeList => _amService.amModelList; get amRequestModeList => _amService.amModelList;
List<PatientAllPresOrders> get patientAllPresOrdersList =>_amService.patientAllPresOrdersList; List<PatientAllPresOrders> get patientAllPresOrdersList =>_amService.patientAllPresOrdersList;

@ -34,10 +34,11 @@ class _AmbulanceReqState extends State<AmbulanceReq>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<AmRequestViewModel>( return BaseView<AmRequestViewModel>(
// onModelReady: (model) => model.getAmRequestOrders(), onModelReady: (model) => model.getAmRequestOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: "Ambulance Request", appBarTitle: "Ambulance Request",
baseViewModel: model,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: PreferredSize( appBar: PreferredSize(
@ -109,7 +110,7 @@ class _AmbulanceReqState extends State<AmbulanceReq>
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
AmbulanceRequestIndex(), AmbulanceRequestIndex(amRequestViewModel: model,),
Container() Container()
], ],
), ),

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/pages/ErService/widgets/StepesWideget.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -8,27 +10,31 @@ import 'SelectTransportationMethod.dart';
import 'Summary.dart'; import 'Summary.dart';
class AmbulanceRequestIndex extends StatefulWidget { class AmbulanceRequestIndex extends StatefulWidget {
final AmRequestViewModel amRequestViewModel;
AmbulanceRequestIndex({Key key, this.amRequestViewModel});
@override @override
_AmbulanceRequestIndexState createState() => _AmbulanceRequestIndexState(); _AmbulanceRequestIndexState createState() => _AmbulanceRequestIndexState();
} }
class _AmbulanceRequestIndexState extends State<AmbulanceRequestIndex> { class _AmbulanceRequestIndexState extends State<AmbulanceRequestIndex> {
int currentIndex = 0; int currentIndex = 0;
PageController pageController; PageController pageController;
PatientER _patientER = PatientER();
_changeCurrentTab(int tab) { _changeCurrentTab(int tab) {
setState(() { setState(() {
currentIndex = tab; currentIndex = tab;
}); });
pageController.animateToPage(tab, duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart); pageController.animateToPage(tab,
duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart);
} }
@override @override
void initState() { void initState() {
super.initState(); super.initState();
pageController = new PageController(); pageController = new PageController();
} }
@override @override
@ -36,19 +42,40 @@ class _AmbulanceRequestIndexState extends State<AmbulanceRequestIndex> {
return AppScaffold( return AppScaffold(
body: Column( body: Column(
children: [ children: [
SizedBox(height: 80,), SizedBox(
height: 80,
),
Container( Container(
margin: EdgeInsets.only(left: 12,right: 12), margin: EdgeInsets.only(left: 12, right: 12),
child: StepesWidget(index: currentIndex,changeCurrentTab: _changeCurrentTab,)), child: StepsWidget(
index: currentIndex,
changeCurrentTab: _changeCurrentTab,
)),
Expanded( Expanded(
child: PageView( child: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: pageController, controller: pageController,
children: <Widget>[ children: <Widget>[
SelectTransportationMethod(changeCurrentTab: _changeCurrentTab,), SelectTransportationMethod(
PickupLocation(changeCurrentTab: _changeCurrentTab,), changeCurrentTab: _changeCurrentTab,
BillAmount(changeCurrentTab: _changeCurrentTab,), patientER: _patientER,
Summary(changeCurrentTab: _changeCurrentTab,), amRequestViewModel: widget.amRequestViewModel,
),
PickupLocation(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
amRequestViewModel: widget.amRequestViewModel,
),
BillAmount(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
amRequestViewModel: widget.amRequestViewModel,
),
Summary(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
amRequestViewModel: widget.amRequestViewModel,
),
], ],
), ),
), ),

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -5,8 +7,10 @@ import 'package:flutter/material.dart';
class BillAmount extends StatefulWidget { class BillAmount extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
final PatientER patientER;
final AmRequestViewModel amRequestViewModel;
BillAmount({Key key, this.changeCurrentTab}); BillAmount({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel});
@override @override
_BillAmountState createState() => _BillAmountState(); _BillAmountState createState() => _BillAmountState();

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -5,8 +7,9 @@ import 'package:flutter/material.dart';
class PickupLocation extends StatefulWidget { class PickupLocation extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
final PatientER patientER;
PickupLocation({Key key, this.changeCurrentTab}); PickupLocation({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel});
final AmRequestViewModel amRequestViewModel;
@override @override
_PickupLocationState createState() => _PickupLocationState(); _PickupLocationState createState() => _PickupLocationState();

@ -1,13 +1,24 @@
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
enum Direction { ToHospital, FromHospital }
enum Way { OneWay, TwoWays }
class SelectTransportationMethod extends StatefulWidget { class SelectTransportationMethod extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
final PatientER patientER;
final AmRequestViewModel amRequestViewModel;
SelectTransportationMethod({Key key, this.changeCurrentTab}); SelectTransportationMethod(
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
@override @override
_SelectTransportationMethodState createState() => _SelectTransportationMethodState createState() =>
@ -16,24 +27,251 @@ class SelectTransportationMethod extends StatefulWidget {
class _SelectTransportationMethodState class _SelectTransportationMethodState
extends State<SelectTransportationMethod> { extends State<SelectTransportationMethod> {
PatientERTransportationMethod _erTransportationMethod =
PatientERTransportationMethod();
Direction _direction = Direction.FromHospital;
Way _way = Way.OneWay;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Container(
children: [ margin: EdgeInsets.only(left: 12, right: 12),
Texts('SelectTransportationMethod 1'), child: Column(
SizedBox(height: 45,), crossAxisAlignment: CrossAxisAlignment.start,
Container( children: [
padding: EdgeInsets.all(15), SizedBox(
width: double.maxFinite, height: 12,
height: 76, ),
child:SecondaryButton( Texts('Select Transportation Method'),
color: Colors.grey[800], ...List.generate(
textColor: Colors.white, widget.amRequestViewModel.amRequestModeList.length,
onTap: ()=> widget.changeCurrentTab(1), (index) => InkWell(
label: 'Next', onTap: () {
setState(() {
_erTransportationMethod =
widget.amRequestViewModel.amRequestModeList[index];
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: Row(
children: [
Expanded(
flex: 3,
child: ListTile(
title: Text(widget
.amRequestViewModel.amRequestModeList[index].title),
leading: Radio(
value: widget
.amRequestViewModel.amRequestModeList[index],
groupValue: _erTransportationMethod,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_erTransportationMethod = value;
});
},
),
),
),
Expanded(
flex: 1,
child: Texts(
'SR ${widget.amRequestViewModel.amRequestModeList[index].price}'),
)
],
),
),
),
),
SizedBox(
height: 12,
),
Texts('Select Direction'),
SizedBox(
height: 5,
),
Row(
children: [
Expanded(
child: InkWell(
onTap: () {
setState(() {
_direction = Direction.ToHospital;
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: Row(
children: [
ListTile(
title: Text('To Hospital'),
leading: Radio(
value: Direction.ToHospital,
groupValue: _direction,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_direction = value;
});
},
),
),
],
),
),
),
),
Expanded(
child: InkWell(
onTap: () {
setState(() {
_direction = Direction.FromHospital;
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: Row(
children: [
ListTile(
title: Text('To Hospital'),
leading: Radio(
value: Direction.FromHospital,
groupValue: _direction,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_direction = value;
});
},
),
),
],
),
),
),
),
],
),
if (_direction == Direction.ToHospital)
Column(
children: [
Texts('Select Direction'),
SizedBox(
height: 5,
),
Row(
children: [
Expanded(
child: InkWell(
onTap: () {
setState(() {
_way = Way.OneWay;
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: Row(
children: [
ListTile(
title: Text('One Way'),
leading: Radio(
value: Way.OneWay,
groupValue: _way,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_way = value;
});
},
),
),
],
),
),
),
),
Expanded(
child: InkWell(
onTap: () {
setState(() {
_way = Way.TwoWays;
});
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: Row(
children: [
ListTile(
title: Text('Two Ways'),
leading: Radio(
value: Way.TwoWays,
groupValue: _way,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
_way = 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.direction = _direction == Direction.ToHospital ? 1 : 2;
widget.patientER.tripType = _way == Way.TwoWays ? 1 : 2;
widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod)+1);
widget.changeCurrentTab(1);
});
},
label: 'Next',
),
)
],
),
); );
} }
} }

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -5,8 +7,10 @@ import 'package:flutter/material.dart';
class Summary extends StatefulWidget { class Summary extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
final PatientER patientER;
final AmRequestViewModel amRequestViewModel;
Summary({Key key, this.changeCurrentTab}); Summary({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel});
@override @override
_SummaryState createState() => _SummaryState(); _SummaryState createState() => _SummaryState();

@ -2,11 +2,11 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class StepesWidget extends StatelessWidget { class StepsWidget extends StatelessWidget {
final int index; final int index;
final Function changeCurrentTab; final Function changeCurrentTab;
StepesWidget({Key key, this.index, this.changeCurrentTab}); StepsWidget({Key key, this.index, this.changeCurrentTab});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -18,9 +18,9 @@ class StepesWidget extends StatelessWidget {
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
child: Divider( child: Divider(
color: Colors.black, color: Colors.grey,
height: 3, height: 0.75,
thickness: 3, thickness: 0.75,
), ),
), ),
), ),
@ -30,16 +30,17 @@ class StepesWidget extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
child: Container( child: Container(
width: 25, width: 35,
height: 25, height: 35,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 0 ? Colors.grey[800] : Colors.white, color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white,
), ),
child: Center( child: Center(
child: Texts( child: Texts(
'1', '1',
color: index == 0 ? Colors.white:Colors.grey[800] , color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800],
), ),
), ),
), ),
@ -47,20 +48,21 @@ class StepesWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 10, top: 10,
left: MediaQuery.of(context).size.width *0.3, left: MediaQuery.of(context).size.width * 0.3,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(1), onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Container( child: Container(
width: 25, width: 35,
height: 25, height: 35,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 1 ? Colors.grey[800] : Colors.white, color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
), ),
child: Center( child: Center(
child: Texts( child: Texts(
'2', '2',
color: index == 1 ? Colors.white:Colors.grey[800], color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
), ),
), ),
), ),
@ -68,20 +70,21 @@ class StepesWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 10, top: 10,
left: MediaQuery.of(context).size.width *0.6, left: MediaQuery.of(context).size.width * 0.6,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(2), onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Container( child: Container(
width: 25, width: 35,
height: 25, height: 35,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 2 ? Colors.grey[800] : Colors.white, 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: Center(
child: Texts( child: Texts(
'3', '3',
color: index == 2 ? Colors.white: Colors.grey[800] , color: index == 2? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
), ),
), ),
), ),
@ -91,18 +94,20 @@ class StepesWidget extends StatelessWidget {
top: 10, top: 10,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(3), onTap: () => index == 2 ?changeCurrentTab(3):null,
child: Container( child: Container(
width: 25, width: 35,
height: 25, height: 35,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 3 ? Colors.grey[800] : Colors.white, color: index == 3 ? Colors.grey[800] : Colors.white,
), ),
child: Center( child: Center(
child: Texts( child: Texts(
'4', '4',
color: index == 3 ? Colors.white:Colors.grey[800] , color: index == 3 ? Colors.white : Colors.grey[800],
), ),
), ),
), ),
Loading…
Cancel
Save