Merge branch 'Dec_fixes' into 'development'

Dec fixes

See merge request Cloud_Solution/doctor_app_flutter!915
merge-requests/916/merge
Elham Ali 3 years ago
commit 5d710054ea

@ -53,6 +53,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
return AppScaffold(
baseViewModel: widget.patientSearchViewModel,
isShowAppBar: false,
backgroundColor: Color(0xFFF8F8F8),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

@ -188,6 +188,21 @@ class Helpers {
static clearSharedPref() async {
await sharedPref.clear();
}
static getCardBoxDecoration(){
return BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle,
boxShadow: [
BoxShadow(
color: Color(0xFF0000000D),
spreadRadius: 10,
blurRadius: 27,
offset: Offset(0, -3), // changes position of shadow
),
],
);
}
navigateToUpdatePage(String message, String androidLink, iosLink) {
locator<NavigationService>().pushAndRemoveUntil(

@ -56,19 +56,7 @@ class PatientCard extends StatelessWidget {
width: SizeConfig.screenWidth * 0.9,
margin: EdgeInsets.all(6),
padding: EdgeInsets.only(left: projectViewModel.isArabic?5:0, right: projectViewModel.isArabic?0:5, bottom: 0, top: 0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle,
boxShadow: [
BoxShadow(
color: Color(0x0000000D),
spreadRadius: 10,
blurRadius: 2.7,
offset: Offset(0, -3 ), // changes position of shadow
),
],
),
decoration:Helpers.getCardBoxDecoration(),
child: CardWithBgWidget(
padding: 0,
marginLeft: (!isMyPatient && isInpatient) ? 0 : 10,
@ -108,14 +96,8 @@ class PatientCard extends StatelessWidget {
patientInfo.patientStatusType == 43
? Row(
children: [
AppText(
TranslationBase.of(context)
.arrivedP,
color: AppGlobal.appGreenColor,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 10,
),
PatientStatus(label:TranslationBase.of(context)
.arrivedP,color:AppGlobal.appGreenColor,),
SizedBox(
width: 8,
),
@ -129,30 +111,18 @@ class PatientCard extends StatelessWidget {
SizedBox(
width: 8,
),
AppText(
patientInfo.status == 2
? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? AppGlobal.appGreenColor
: Colors.grey,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 10,
),
PatientStatus(label:patientInfo.status == 2
? 'Confirmed'
: 'Booked',color: patientInfo.status == 2
? AppGlobal.appGreenColor
: Colors.grey,),
],
)
: patientInfo.patientStatusType == 42
? Row(
children: [
AppText(
TranslationBase.of(context)
.notArrived,
color: Colors.red[800],
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 10,
),
PatientStatus(label:TranslationBase.of(context)
.notArrived,color:Colors.red[800],),
SizedBox(
width: 8,
),
@ -166,17 +136,10 @@ class PatientCard extends StatelessWidget {
SizedBox(
width: 8,
),
AppText(
patientInfo.status == 2
? 'Confirmed'
: 'Booked',
color: patientInfo.status == 2
? AppGlobal.appGreenColor
: Colors.grey,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 10,
),
PatientStatus(label:patientInfo.status == 2 ? 'Confirmed'
: 'Booked',color:patientInfo.status == 2
? AppGlobal.appGreenColor
: Colors.grey,)
],
)
: !isFromSearch &&
@ -185,14 +148,8 @@ class PatientCard extends StatelessWidget {
null
? Row(
children: [
AppText(
TranslationBase.of(context)
.notArrived,
color: Colors.red[800],
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 12,
),
PatientStatus(label:TranslationBase.of(context)
.notArrived,color:Colors.red[800],),
SizedBox(
width: 8,
),
@ -206,18 +163,13 @@ class PatientCard extends StatelessWidget {
SizedBox(
width: 8,
),
AppText(
patientInfo.status == 2
? 'Booked'
: 'Confirmed',
color:
patientInfo.status == 2
? Colors.grey
: AppGlobal.appGreenColor,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 12,
)
PatientStatus(label:patientInfo.status == 2
? 'Booked'
: 'Confirmed',color:
patientInfo.status == 2
? Colors.grey
: AppGlobal.appGreenColor,)
],
)
: SizedBox(),
@ -264,13 +216,7 @@ class PatientCard extends StatelessWidget {
SizedBox(
width: 12,
),
AppText(
'My Patient',
color: AppGlobal.appGreenColor,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 12,
),
PatientStatus(label:'My Patient',),
],
),
Padding(
@ -282,37 +228,38 @@ class PatientCard extends StatelessWidget {
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
// width: MediaQuery.of(context).size.width*0.51,
child: AppText(
isFromLiveCare
? Helpers.capitalize(
patientInfo.fullName)
: (Helpers.capitalize(
patientInfo.firstName) +
" " +
Helpers.capitalize(
patientInfo.lastName)),
fontSize: 16,
color: Color(0xff2e303a),
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
textOverflow: TextOverflow.ellipsis,
),
AppText(
isFromLiveCare
? Helpers.capitalize(
patientInfo.fullName)
: (Helpers.capitalize(
patientInfo.firstName) +
" " +
Helpers.capitalize(
patientInfo.lastName)),
fontSize: 16,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
letterSpacing: -0.64,
textOverflow: TextOverflow.ellipsis,
),
if (patientInfo.gender == 1)
Icon(
DoctorApp.male_2,
color: Colors.blue,
size: 18,
)
else
Icon(
DoctorApp.female_1,
color: Colors.pink,
size: 18,
),
if (isFromLiveCare)
ShowTimer(
@ -323,15 +270,17 @@ class PatientCard extends StatelessWidget {
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Container(
padding: EdgeInsets.only(top: 8),
alignment: Alignment.centerRight,
child: AppText(
nationalityName.truncate(14),
fontWeight: FontWeight.bold,
fontSize: 14,
fontWeight: FontWeight.w600,
fontSize: 10,
color: Color(0xFF2E303A),
textOverflow: TextOverflow.ellipsis,
),
),
@ -347,8 +296,8 @@ class PatientCard extends StatelessWidget {
null
? patientInfo.nationalityFlagURL
: '',
height: 25,
width: 30,
height: 16,
width: 22,
errorWidget:
(context, url, error) =>
AppText(
@ -362,24 +311,22 @@ class PatientCard extends StatelessWidget {
)
],
)),
Row(children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.start,
SizedBox(height: 10,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Container(
width: 60,
height: 60,
child: Image.asset(
patientInfo.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
),
Padding(
padding: EdgeInsets.only(left: 12.0,top: 5),
child: Container(
width: 60,
height: 60,
child: Image.asset(
patientInfo.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
],
),
),
SizedBox(
width: 10,
@ -390,7 +337,9 @@ class PatientCard extends StatelessWidget {
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
// SizedBox(height: 10,),
CustomRow(
label:
TranslationBase.of(context).fileNumber,
@ -508,3 +457,21 @@ class PatientCard extends StatelessWidget {
));
}
}
class PatientStatus extends StatelessWidget {
PatientStatus({
Key key, this.label, this.color,
}) : super(key: key);
final String label;final Color color;
@override
Widget build(BuildContext context) {
return AppText(
label,
color: color??AppGlobal.appGreenColor,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
fontSize: 10,
);
}
}

@ -47,7 +47,7 @@ class CardWithBgWidget extends StatelessWidget {
bottomRight: Radius.circular(10),
),
),
width: 10,
width: 6,
),
bottom: 1,
top: 1,
@ -63,7 +63,7 @@ class CardWithBgWidget extends StatelessWidget {
bottomLeft: Radius.circular(10),
),
),
width: 7,
width: 5,
),
bottom: 1,
top: 1,

@ -24,17 +24,18 @@ class CustomRow extends StatelessWidget {
children: [
AppText(
label,
fontSize: labelSize??SizeConfig.getTextMultiplierBasedOnWidth() * 2.8,
fontSize: labelSize??SizeConfig.getTextMultiplierBasedOnWidth() * 2.7,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
letterSpacing: -0.4,
),
SizedBox(
width: 1,
),
AppText(
value,
fontSize: valueSize??SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF2E303A),
fontSize: valueSize??SizeConfig.getTextMultiplierBasedOnWidth() * 2.9,
color: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
isCopyable: isCopyable,
),

File diff suppressed because it is too large Load Diff

@ -152,6 +152,8 @@ flutter:
weight: 400
- asset: assets/fonts/Poppins/Poppins-Medium.ttf
weight: 500
- asset: assets/fonts/Poppins/Poppins-SemiBold.ttf
weight: 600
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 700
- asset: assets/fonts/Poppins/Poppins-Bold.ttf

Loading…
Cancel
Save