|
|
@ -32,9 +32,24 @@ class _SelectTransportationMethodState
|
|
|
|
Direction _direction = Direction.FromHospital;
|
|
|
|
Direction _direction = Direction.FromHospital;
|
|
|
|
Way _way = Way.OneWay;
|
|
|
|
Way _way = Way.OneWay;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void initState() {
|
|
|
|
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
if (widget.patientER.direction != null) {
|
|
|
|
|
|
|
|
_direction = widget.patientER.direction == 1
|
|
|
|
|
|
|
|
? Direction.ToHospital
|
|
|
|
|
|
|
|
: Direction.FromHospital;
|
|
|
|
|
|
|
|
_way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays;
|
|
|
|
|
|
|
|
_erTransportationMethod = widget.amRequestViewModel
|
|
|
|
|
|
|
|
.amRequestModeList[(widget.patientER.selectedAmbulate - 1)];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
return SingleChildScrollView(
|
|
|
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(left: 12, right: 12),
|
|
|
|
margin: EdgeInsets.only(left: 12, right: 12),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
@ -53,6 +68,7 @@ class _SelectTransportationMethodState
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
@ -64,8 +80,8 @@ class _SelectTransportationMethodState
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 3,
|
|
|
|
flex: 3,
|
|
|
|
child: ListTile(
|
|
|
|
child: ListTile(
|
|
|
|
title: Text(widget
|
|
|
|
title: Text(widget.amRequestViewModel
|
|
|
|
.amRequestViewModel.amRequestModeList[index].title),
|
|
|
|
.amRequestModeList[index].title),
|
|
|
|
leading: Radio(
|
|
|
|
leading: Radio(
|
|
|
|
value: widget
|
|
|
|
value: widget
|
|
|
|
.amRequestViewModel.amRequestModeList[index],
|
|
|
|
.amRequestViewModel.amRequestModeList[index],
|
|
|
@ -96,7 +112,11 @@ class _SelectTransportationMethodState
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 5,
|
|
|
|
height: 5,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: double.maxFinite,
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
@ -106,15 +126,14 @@ class _SelectTransportationMethodState
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
width: double.maxFinite,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
border: Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
border: Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: ListTile(
|
|
|
|
children: [
|
|
|
|
|
|
|
|
ListTile(
|
|
|
|
|
|
|
|
title: Text('To Hospital'),
|
|
|
|
title: Text('To Hospital'),
|
|
|
|
leading: Radio(
|
|
|
|
leading: Radio(
|
|
|
|
value: Direction.ToHospital,
|
|
|
|
value: Direction.ToHospital,
|
|
|
@ -127,8 +146,6 @@ class _SelectTransportationMethodState
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -140,16 +157,15 @@ class _SelectTransportationMethodState
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
width: double.maxFinite,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
border: Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
border: Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: ListTile(
|
|
|
|
children: [
|
|
|
|
title: Text('Form Hospital'),
|
|
|
|
ListTile(
|
|
|
|
|
|
|
|
title: Text('To Hospital'),
|
|
|
|
|
|
|
|
leading: Radio(
|
|
|
|
leading: Radio(
|
|
|
|
value: Direction.FromHospital,
|
|
|
|
value: Direction.FromHospital,
|
|
|
|
groupValue: _direction,
|
|
|
|
groupValue: _direction,
|
|
|
@ -161,16 +177,19 @@ class _SelectTransportationMethodState
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
if (_direction == Direction.ToHospital)
|
|
|
|
if (_direction == Direction.ToHospital)
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
height: 8,
|
|
|
|
|
|
|
|
),
|
|
|
|
Texts('Select Direction'),
|
|
|
|
Texts('Select Direction'),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 5,
|
|
|
|
height: 5,
|
|
|
@ -188,12 +207,11 @@ class _SelectTransportationMethodState
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
border: Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
border:
|
|
|
|
|
|
|
|
Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: ListTile(
|
|
|
|
children: [
|
|
|
|
|
|
|
|
ListTile(
|
|
|
|
|
|
|
|
title: Text('One Way'),
|
|
|
|
title: Text('One Way'),
|
|
|
|
leading: Radio(
|
|
|
|
leading: Radio(
|
|
|
|
value: Way.OneWay,
|
|
|
|
value: Way.OneWay,
|
|
|
@ -206,8 +224,6 @@ class _SelectTransportationMethodState
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -222,12 +238,11 @@ class _SelectTransportationMethodState
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
border: Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
border:
|
|
|
|
|
|
|
|
Border.all(color: Colors.grey, width: 0.5),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: ListTile(
|
|
|
|
children: [
|
|
|
|
|
|
|
|
ListTile(
|
|
|
|
|
|
|
|
title: Text('Two Ways'),
|
|
|
|
title: Text('Two Ways'),
|
|
|
|
leading: Radio(
|
|
|
|
leading: Radio(
|
|
|
|
value: Way.TwoWays,
|
|
|
|
value: Way.TwoWays,
|
|
|
@ -240,8 +255,6 @@ class _SelectTransportationMethodState
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -261,9 +274,13 @@ class _SelectTransportationMethodState
|
|
|
|
textColor: Colors.white,
|
|
|
|
textColor: Colors.white,
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 2;
|
|
|
|
widget.patientER.direction =
|
|
|
|
widget.patientER.tripType = _way == Way.TwoWays ? 1 : 2;
|
|
|
|
_direction == Direction.ToHospital ? 1 : 2;
|
|
|
|
widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod)+1);
|
|
|
|
widget.patientER.tripType = _way == Way.TwoWays ? 2 : 1;
|
|
|
|
|
|
|
|
widget.patientER.selectedAmbulate = (widget
|
|
|
|
|
|
|
|
.amRequestViewModel.amRequestModeList
|
|
|
|
|
|
|
|
.indexOf(_erTransportationMethod) +
|
|
|
|
|
|
|
|
1);
|
|
|
|
widget.changeCurrentTab(1);
|
|
|
|
widget.changeCurrentTab(1);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -272,6 +289,7 @@ class _SelectTransportationMethodState
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|