|
|
|
@ -69,7 +69,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).myReferralPatient,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).referralPatient,
|
|
|
|
|
body: patientsProv.isLoading
|
|
|
|
|
? DrAppCircularProgressIndeicator()
|
|
|
|
|
: patientsProv.isError
|
|
|
|
@ -91,7 +91,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
margin: 10,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
raduis: 30,
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
@ -106,6 +106,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
Expanded(
|
|
|
|
|
// add Expanded to have your dropdown button fill remaining space
|
|
|
|
|
child: DropdownButton(
|
|
|
|
|
//hint: Text('Select Clinnic'),
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
value: _selectedClinic,
|
|
|
|
|
iconSize: 40,
|
|
|
|
@ -176,7 +177,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
margin: 10,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
raduis: 30,
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
@ -197,21 +198,37 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
elevation: 16,
|
|
|
|
|
selectedItemBuilder:
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
return patientsProv
|
|
|
|
|
.getDoctorNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.textMultiplier *
|
|
|
|
|
2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
return _selectedDoctor == ''
|
|
|
|
|
? [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize:
|
|
|
|
|
MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
"eeeee",
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.textMultiplier *
|
|
|
|
|
2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
]
|
|
|
|
|
: patientsProv
|
|
|
|
|
.getDoctorNameList()
|
|
|
|
|
.map((item) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize:
|
|
|
|
|
MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item,
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.textMultiplier *
|
|
|
|
|
2.1,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList();
|
|
|
|
|
},
|
|
|
|
|
onChanged: (newValue) => {
|
|
|
|
|
setState(() {
|
|
|
|
@ -262,13 +279,6 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
onChanged: (value) => {},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).priority,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
marginLeft: 15,
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
priorityBar(context),
|
|
|
|
|
|
|
|
|
@ -290,7 +300,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
RoundedContainer(
|
|
|
|
|
margin: 10,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
raduis: 30,
|
|
|
|
|
raduis: 10,
|
|
|
|
|
borderColor: Color(0xff707070),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
@ -391,7 +401,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
),
|
|
|
|
|
AppButton(
|
|
|
|
|
title: TranslationBase.of(context).send,
|
|
|
|
|
color: Color(PRIMARY_COLOR),
|
|
|
|
|
color: (Hexcolor("#B8382B")),
|
|
|
|
|
onPressed: () => {referToDoctor(context)},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
@ -404,67 +414,78 @@ class _ReferPatientState extends State<ReferPatientScreen> {
|
|
|
|
|
|
|
|
|
|
Widget priorityBar(BuildContext _context) {
|
|
|
|
|
List<String> _priorities = [
|
|
|
|
|
TranslationBase.of(context).veryUrgent,
|
|
|
|
|
TranslationBase.of(context).urgent,
|
|
|
|
|
TranslationBase.of(context).routine,
|
|
|
|
|
TranslationBase.of(context).veryUrgent.toUpperCase(),
|
|
|
|
|
TranslationBase.of(context).urgent.toUpperCase(),
|
|
|
|
|
TranslationBase.of(context).routine.toUpperCase(),
|
|
|
|
|
];
|
|
|
|
|
return Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.065,
|
|
|
|
|
width: SizeConfig.screenWidth * 0.9,
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: _priorities.map((item) {
|
|
|
|
|
bool _isActive = _priorities[_activePriority] == item ? true : false;
|
|
|
|
|
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 40,
|
|
|
|
|
width: 90,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(50),
|
|
|
|
|
color: _isActive ? Hexcolor("#B8382B") : Colors.white,
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color: _isActive
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors.black, //Colors.black,
|
|
|
|
|
// backgroundColor:_isActive
|
|
|
|
|
// ? Hexcolor("#B8382B")
|
|
|
|
|
// : Colors.white,//sideColor,
|
|
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
return Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.061999,
|
|
|
|
|
width: SizeConfig.screenWidth * 0.90,
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0Xffffffff),
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
border: Border.all(width: 0.3),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: _priorities.map((item) {
|
|
|
|
|
bool _isActive =
|
|
|
|
|
_priorities[_activePriority] == item ? true : false;
|
|
|
|
|
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.0559,
|
|
|
|
|
width: SizeConfig.screenWidth * 0.297,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: Radius.circular(8.0),
|
|
|
|
|
bottomLeft: Radius.circular(8.0),
|
|
|
|
|
topRight: Radius.circular(10.0),
|
|
|
|
|
bottomRight: Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
color: _isActive ? Hexcolor("#B8382B") : Colors.white,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
print(_priorities.indexOf(item));
|
|
|
|
|
setState(() {
|
|
|
|
|
_activePriority = _priorities.indexOf(item);
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
_isActive
|
|
|
|
|
? Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
height: 3,
|
|
|
|
|
width: 90,
|
|
|
|
|
)
|
|
|
|
|
: Container()
|
|
|
|
|
]);
|
|
|
|
|
}).toList(),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color: _isActive
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors.black, //Colors.black,
|
|
|
|
|
// backgroundColor:_isActive
|
|
|
|
|
// ? Hexcolor("#B8382B")
|
|
|
|
|
// : Colors.white,//sideColor,
|
|
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
print(_priorities.indexOf(item));
|
|
|
|
|
setState(() {
|
|
|
|
|
_activePriority = _priorities.indexOf(item);
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
_isActive
|
|
|
|
|
? Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
height: 3,
|
|
|
|
|
width: 90,
|
|
|
|
|
)
|
|
|
|
|
: Container()
|
|
|
|
|
]);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|