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,21 +198,37 @@ class _ReferPatientState extends State<ReferPatientScreen> {
elevation: 16, elevation: 16,
selectedItemBuilder: selectedItemBuilder:
(BuildContext context) { (BuildContext context) {
return patientsProv return _selectedDoctor == ''
.getDoctorNameList() ? [
.map((item) { Row(
return Row( mainAxisSize:
mainAxisSize: MainAxisSize.max, MainAxisSize.max,
children: <Widget>[ children: <Widget>[
AppText( AppText(
item, "eeeee",
fontSize: fontSize: SizeConfig
SizeConfig.textMultiplier * .textMultiplier *
2.1, 2.1,
), ),
], ],
); )
}).toList(); ]
: patientsProv
.getDoctorNameList()
.map((item) {
return Row(
mainAxisSize:
MainAxisSize.max,
children: <Widget>[
AppText(
item,
fontSize: SizeConfig
.textMultiplier *
2.1,
),
],
);
}).toList();
}, },
onChanged: (newValue) => { onChanged: (newValue) => {
setState(() { setState(() {
@ -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,67 +414,78 @@ 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,
margin: EdgeInsets.only(top: 10), width: SizeConfig.screenWidth * 0.90,
decoration: BoxDecoration( margin: EdgeInsets.only(top: 10),
color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)), decoration: BoxDecoration(
child: Row( color: Color(0Xffffffff),
mainAxisAlignment: MainAxisAlignment.spaceEvenly, borderRadius: BorderRadius.circular(10),
mainAxisSize: MainAxisSize.max, border: Border.all(width: 0.3),
crossAxisAlignment: CrossAxisAlignment.center, ),
children: _priorities.map((item) { child: Row(
bool _isActive = _priorities[_activePriority] == item ? true : false; mainAxisAlignment: MainAxisAlignment.spaceEvenly,
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[ mainAxisSize: MainAxisSize.max,
InkWell( crossAxisAlignment: CrossAxisAlignment.center,
child: Center( children: _priorities.map((item) {
child: Container( bool _isActive =
height: 40, _priorities[_activePriority] == item ? true : false;
width: 90, return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
decoration: BoxDecoration( InkWell(
borderRadius: BorderRadius.circular(50), child: Center(
color: _isActive ? Hexcolor("#B8382B") : Colors.white, child: Container(
), height: MediaQuery.of(context).size.height * 0.0559,
child: Center( width: SizeConfig.screenWidth * 0.297,
child: Text( decoration: BoxDecoration(
item, borderRadius: BorderRadius.only(
style: TextStyle( topLeft: Radius.circular(8.0),
fontSize: 12, bottomLeft: Radius.circular(8.0),
color: _isActive topRight: Radius.circular(10.0),
? Colors.white bottomRight: Radius.circular(10.0),
: Colors.black, //Colors.black,
// backgroundColor:_isActive
// ? Hexcolor("#B8382B")
// : Colors.white,//sideColor,
fontWeight: FontWeight.bold,
), ),
color: _isActive ? Hexcolor("#B8382B") : Colors.white,
), ),
)), child: Center(
), child: Text(
onTap: () { item,
print(_priorities.indexOf(item)); style: TextStyle(
setState(() { fontSize: 12,
_activePriority = _priorities.indexOf(item); color: _isActive
}); ? Colors.white
}), : Colors.black, //Colors.black,
_isActive // backgroundColor:_isActive
? Container( // ? Hexcolor("#B8382B")
decoration: BoxDecoration( // : Colors.white,//sideColor,
borderRadius: BorderRadius.circular(10),
color: Colors.white), fontWeight: FontWeight.bold,
alignment: Alignment.center, ),
height: 3, ),
width: 90, )),
) ),
: Container() onTap: () {
]); print(_priorities.indexOf(item));
}).toList(), 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]; 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,
fontSize: 2.5 * SizeConfig.textMultiplier),
AppText( AppText(
' ${workingHoursTable.date.day}/${workingHoursTable.date.month}/${workingHoursTable.date.year}', workingHoursTable.dayName,
fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,), fontSize: 2.5 * SizeConfig.textMultiplier,
),
AppText(
' ${workingHoursTable.date.day}/${workingHoursTable.date.month}/${workingHoursTable.date.year}',
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