refer_patient_screen 'not finshed'

merge-requests/195/head
hussam al-habibeh 4 years ago
parent 6f90c31f9f
commit c581638e00

@ -248,4 +248,5 @@ const Map<String, Map<String, String>> localizedValues = {
},
'gender2': {'en': 'Gender: ', 'ar': 'الجنس: '},
'age2': {'en': 'Age: ', 'ar': 'العمر: '},
'referralPatient': {'en': 'Referral Patient', 'ar': 'المريض المحال '},
};

@ -40,9 +40,7 @@ class _LandingPageState extends State<LandingPage> {
appBar: AppBar(
elevation: 0,
backgroundColor: Hexcolor('#515B5D'),
textTheme: TextTheme(
headline6:
TextStyle(color: Colors.white)),
textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: Text(getText(currentTab).toUpperCase()),
leading: Builder(
builder: (BuildContext context) {

@ -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(),
),
),
);
}

@ -275,6 +275,8 @@ class TranslationBase {
localizedValues['moreThan3Letter'][locale.languageCode];
String get gender2 => localizedValues['gender2'][locale.languageCode];
String get age2 => localizedValues['age2'][locale.languageCode];
String get referralPatient =>
localizedValues['referralPatient'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -13,19 +13,27 @@ class MyScheduleWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
List<WorkingHours> workingHours = Helpers.getWorkingHours(workingHoursTable.workingHours);
List<WorkingHours> workingHours =
Helpers.getWorkingHours(workingHoursTable.workingHours);
return CardWithBgWidgetNew(
widget: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
children: [Text('${workingHoursTable.date.day}')],
),
Row(
children: <Widget>[
AppText(workingHoursTable.dayName,
fontSize: 2.5 * SizeConfig.textMultiplier),
AppText(
' ${workingHoursTable.date.day}/${workingHoursTable.date.month}/${workingHoursTable.date.year}',
fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,),
workingHoursTable.dayName,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
AppText(
' ${workingHoursTable.date.day}/${workingHoursTable.date.month}/${workingHoursTable.date.year}',
fontSize: 2.2 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
),
],
),
SizedBox(
@ -44,27 +52,50 @@ class MyScheduleWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText('From',fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.bold,),
SizedBox(height: 5,),
AppText(work.from,fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,)
AppText(
'From',
fontSize: 2.2 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 5,
),
AppText(
work.from,
fontSize: 2.2 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Container(height: SizeConfig.realScreenWidth * 0.1 ,width: 0.8,color: Colors.grey,
margin: EdgeInsets.only(left: 15,right: 15),),
Container(
height: SizeConfig.realScreenWidth * 0.1,
width: 0.8,
color: Colors.grey,
margin: EdgeInsets.only(left: 15, right: 15),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText('To',fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.bold,),
SizedBox(height: 5,),
AppText(work.to,fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,)
AppText(
'To',
fontSize: 2.2 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 5,
),
AppText(
work.to,
fontSize: 2.2 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
],
)
],
),
);

Loading…
Cancel
Save