|
|
|
|
@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/Blood/dialogs/SelectHospitalDialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/ProgressDialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
@ -13,12 +12,12 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.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';
|
|
|
|
|
|
|
|
|
|
@ -51,9 +50,7 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
_getCurrentLocation();
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
setState(() {});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_getCurrentLocation() async {
|
|
|
|
|
@ -64,7 +61,6 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
_longitude = 0;
|
|
|
|
|
_latitude = 0;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -75,7 +71,7 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 12, right: 12),
|
|
|
|
|
margin: EdgeInsets.only(left: 12, right: 12, top: 12),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
@ -83,43 +79,66 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(TranslationBase.of(context).pickupLocation),
|
|
|
|
|
Text(TranslationBase.of(context).pickupLocation, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PickupLocationFromMap(
|
|
|
|
|
latitude: _latitude??0,
|
|
|
|
|
longitude: _longitude??0,
|
|
|
|
|
onPick: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_result = value;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
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,
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Color(0xffefefef),
|
|
|
|
|
width: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PickupLocationFromMap(
|
|
|
|
|
latitude: _latitude ?? 0,
|
|
|
|
|
longitude: _longitude ?? 0,
|
|
|
|
|
onPick: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_result = value;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(child: Texts(getSelectFromMapName(context))),
|
|
|
|
|
Icon(
|
|
|
|
|
FontAwesomeIcons.mapMarkerAlt,
|
|
|
|
|
size: 24,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).selectMap,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
letterSpacing: -0.44,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
getSelectFromMapName(context),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
height: 21 / 14,
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
letterSpacing: -0.44,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Icon(Icons.arrow_drop_down),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -127,7 +146,7 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
Texts(TranslationBase.of(context).pickupSpot),
|
|
|
|
|
Text(TranslationBase.of(context).pickupSpot, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
@ -138,21 +157,27 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
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: Texts(TranslationBase.of(context).insideHome),
|
|
|
|
|
leading: Checkbox(
|
|
|
|
|
value: _isInsideHome,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isInsideHome = value;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
contentPadding: EdgeInsets.only(left: 0.0, right: 0.0),
|
|
|
|
|
title: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: _isInsideHome,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isInsideHome = value;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).insideHome,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -160,7 +185,7 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
Texts(TranslationBase.of(context).haveAppo),
|
|
|
|
|
Text(TranslationBase.of(context).haveAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
@ -177,25 +202,31 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
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: Texts(TranslationBase.of(context).yes),
|
|
|
|
|
leading: Radio(
|
|
|
|
|
value: HaveAppointment.YES,
|
|
|
|
|
groupValue: _haveAppointment,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
if (myAppointment == null) {
|
|
|
|
|
getAppointment();
|
|
|
|
|
setState(() {
|
|
|
|
|
_haveAppointment = value;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
contentPadding: EdgeInsets.only(left: 0.0, right: 0.0),
|
|
|
|
|
title: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Radio(
|
|
|
|
|
value: HaveAppointment.YES,
|
|
|
|
|
groupValue: _haveAppointment,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
if (myAppointment == null) {
|
|
|
|
|
getAppointment();
|
|
|
|
|
setState(() {
|
|
|
|
|
_haveAppointment = value;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).yes,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -210,23 +241,29 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
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: Texts(TranslationBase.of(context).no),
|
|
|
|
|
leading: Radio(
|
|
|
|
|
value: HaveAppointment.NO,
|
|
|
|
|
groupValue: _haveAppointment,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_haveAppointment = value;
|
|
|
|
|
myAppointment = null;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
contentPadding: EdgeInsets.only(left: 0.0, right: 0.0),
|
|
|
|
|
title: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Radio(
|
|
|
|
|
value: HaveAppointment.NO,
|
|
|
|
|
groupValue: _haveAppointment,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_haveAppointment = value;
|
|
|
|
|
myAppointment = null;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).no,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -249,31 +286,54 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
Texts(TranslationBase.of(context).dropoffLocation),
|
|
|
|
|
Text(TranslationBase.of(context).dropoffLocation, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals);
|
|
|
|
|
},
|
|
|
|
|
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,
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Color(0xffefefef),
|
|
|
|
|
width: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals);
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(getHospitalName(TranslationBase.of(context).selectHospital)),
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.arrow_drop_down,
|
|
|
|
|
size: 24,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).selectHospital,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
letterSpacing: -0.44,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
getHospitalName(""),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
height: 21 / 14,
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
letterSpacing: -0.44,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Icon(Icons.arrow_drop_down),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -284,26 +344,54 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(TranslationBase.of(context).pickupLocation),
|
|
|
|
|
Text(TranslationBase.of(context).pickupLocation, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals);
|
|
|
|
|
},
|
|
|
|
|
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,
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Color(0xffefefef),
|
|
|
|
|
width: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals);
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).selectHospital,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
letterSpacing: -0.44,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
getHospitalName(""),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
height: 21 / 14,
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
letterSpacing: -0.44,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.arrow_drop_down,
|
|
|
|
|
size: 24,
|
|
|
|
|
@ -316,44 +404,67 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
Texts(TranslationBase.of(context).dropoffLocation),
|
|
|
|
|
Text(TranslationBase.of(context).dropoffLocation, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PickupLocationFromMap(
|
|
|
|
|
latitude: _latitude,
|
|
|
|
|
longitude: _longitude,
|
|
|
|
|
onPick: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_result = value;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
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,
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Color(0xffefefef),
|
|
|
|
|
width: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PickupLocationFromMap(
|
|
|
|
|
latitude: _latitude,
|
|
|
|
|
longitude: _longitude,
|
|
|
|
|
onPick: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_result = value;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(child: Texts(getSelectFromMapName(context))),
|
|
|
|
|
Icon(
|
|
|
|
|
FontAwesomeIcons.mapMarkerAlt,
|
|
|
|
|
size: 24,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).selectMap,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
letterSpacing: -0.44,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
getSelectFromMapName(context),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
height: 21 / 14,
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
letterSpacing: -0.44,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Icon(Icons.arrow_drop_down),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -442,16 +553,22 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int _selectedHospitalIndex = -1;
|
|
|
|
|
|
|
|
|
|
void confirmSelectHospitalDialog(List<HospitalsModel> hospitals) {
|
|
|
|
|
List<RadioSelectionDialogModel> list = [
|
|
|
|
|
for (int i = 0; i < hospitals.length; i++) RadioSelectionDialogModel(hospitals[i].name + ' ${hospitals[i].distanceInKilometers} ' + TranslationBase.of(context).km, i),
|
|
|
|
|
];
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
child: SelectHospitalDialog(
|
|
|
|
|
hospitals: hospitals,
|
|
|
|
|
selectedHospital: _selectedHospital,
|
|
|
|
|
onValueSelected: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_selectedHospital = value;
|
|
|
|
|
});
|
|
|
|
|
child: RadioSelectionDialog(
|
|
|
|
|
listData: list,
|
|
|
|
|
selectedIndex: _selectedHospitalIndex,
|
|
|
|
|
isScrollable: true,
|
|
|
|
|
onValueSelected: (index) {
|
|
|
|
|
_selectedHospitalIndex = index;
|
|
|
|
|
_selectedHospital = hospitals[index];
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
@ -462,7 +579,7 @@ class _PickupLocationState extends State<PickupLocation> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String getSelectFromMapName(context) {
|
|
|
|
|
return _result != null ? _result.formattedAddress : TranslationBase.of(context).selectMap;
|
|
|
|
|
return _result != null ? _result.formattedAddress : "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getAppointment() {
|
|
|
|
|
|