refer_patient_screen 'not finshed'

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

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

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

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

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

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