Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into fix_issus_soap

 Conflicts:
	lib/screens/patients/profile/patient_profile_screen.dart
merge-requests/620/head
Elham Rababah 5 years ago
commit dcdbe76e54

@ -447,7 +447,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "Is Sick Leave Required", 'en': "Is Sick Leave Required",
'ar': 'هل الإجازة المرضية مطلوبة' 'ar': 'هل الإجازة المرضية مطلوبة'
}, },
'patientPregnant': {'en': "Patient Pregnant", 'ar': 'حمل المريض'}, 'patientPregnant': {'en': "Patient Pregnant", 'ar': 'المريض حامل'},
'treatmentLine': { 'treatmentLine': {
'en': "Main line of treatment", 'en': "Main line of treatment",
'ar': 'الخط الرئيسي للعلاج' 'ar': 'الخط الرئيسي للعلاج'
@ -870,4 +870,6 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
"showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"}, "showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"},
"viewProfile": {"en": "View Profile", "ar": "إعرض الملف"}, "viewProfile": {"en": "View Profile", "ar": "إعرض الملف"},
"severe": {"en": "Severe", "ar": "الشدة"},
"graphDetails": {"en": "Graph Details", "ar": "تفاصيل الرسم البياني"},
}; };

@ -163,7 +163,7 @@ class AdmissionRequestService extends LookupService {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['patientMRN'] = patientMrn; body['PatientMRN'] = patientMrn;
await baseAppClient.post( await baseAppClient.post(
GET_DIET_TYPES, GET_DIET_TYPES,

@ -23,7 +23,7 @@ class VitalSignsViewModel extends BaseViewModel {
String hartRat = "0"; String hartRat = "0";
String respirationBeatPerMinute = "0"; String respirationBeatPerMinute = "0";
String bloodPressure = "0 / 0"; String bloodPressure = "0 / 0";
String oxygenation = "0 - 0"; String oxygenation = "0";
String painScore = "-"; String painScore = "-";
String painLocation = "-"; String painLocation = "-";
String painCharacter = "-"; String painCharacter = "-";
@ -93,11 +93,11 @@ class VitalSignsViewModel extends BaseViewModel {
bloodPressure == 'null') { bloodPressure == 'null') {
bloodPressure = element.bloodPressure.toString(); bloodPressure = element.bloodPressure.toString();
} }
if (oxygenation == "0 - 0" || if (oxygenation == "0" ||
oxygenation == null || oxygenation == null ||
oxygenation == 'null') { oxygenation == 'null') {
oxygenation = oxygenation =
"${element.sAO2.toString()} - ${element.fIO2.toString()}"; "${element.sAO2.toString()}";/* - ${element.fIO2.toString()}*/
} }
if (painScore == null || painScore == "-") { if (painScore == null || painScore == "-") {
painScore = element.painScore.toString() != 'null' painScore = element.painScore.toString() != 'null'

@ -44,6 +44,7 @@ class _AdmissionRequestThirdScreenState
String clinicError; String clinicError;
String doctorError; String doctorError;
String sickLeaveCommentError; String sickLeaveCommentError;
String dietTypeError;
String medicalHistoryError; String medicalHistoryError;
String surgicalHistoryError; String surgicalHistoryError;
@ -78,8 +79,6 @@ class _AdmissionRequestThirdScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// PatientProfileHeaderNewDesign(
// patient, patientType, arrivalType),
Container( Container(
margin: EdgeInsets.all(16.0), margin: EdgeInsets.all(16.0),
child: Column( child: Column(
@ -87,15 +86,15 @@ class _AdmissionRequestThirdScreenState
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).admission}", "${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
), ),
AppText( AppText(
"${TranslationBase.of(context).request}", TranslationBase.of(context).request,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
) )
], ],
), ),
@ -109,7 +108,7 @@ class _AdmissionRequestThirdScreenState
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.specialityAndDoctorDetail, .specialityAndDoctorDetail,
fontFamily: 'Poppins', color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
@ -278,6 +277,7 @@ class _AdmissionRequestThirdScreenState
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).dietType, hintText: TranslationBase.of(context).dietType,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: dietTypeError,
dropDownText: _selectedDietType != null dropDownText: _selectedDietType != null
? _selectedDietType['nameEn'] ? _selectedDietType['nameEn']
: null, : null,
@ -426,6 +426,11 @@ class _AdmissionRequestThirdScreenState
}else { }else {
sickLeaveCommentError = null; sickLeaveCommentError = null;
} }
if(_selectedDietType == null){
dietTypeError = TranslationBase.of(context).fieldRequired;
}else {
dietTypeError = null;
}
if(_postMedicalHistoryController.text == ""){ if(_postMedicalHistoryController.text == ""){
medicalHistoryError = TranslationBase.of(context).fieldRequired; medicalHistoryError = TranslationBase.of(context).fieldRequired;
}else { }else {

@ -76,15 +76,15 @@ class _AdmissionRequestThirdScreenState
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).admission}", "${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
), ),
AppText( AppText(
"${TranslationBase.of(context).request}", TranslationBase.of(context).request,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
) )
], ],
), ),
@ -96,7 +96,7 @@ class _AdmissionRequestThirdScreenState
children: [ children: [
AppText( AppText(
TranslationBase.of(context).diagnosisDetail, TranslationBase.of(context).diagnosisDetail,
fontFamily: 'Poppins', color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),

@ -91,8 +91,6 @@ class _AdmissionRequestSecondScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// PatientProfileHeaderNewDesign(
// patient, patientType, arrivalType),
Container( Container(
margin: EdgeInsets.all(16.0), margin: EdgeInsets.all(16.0),
child: Column( child: Column(
@ -100,15 +98,15 @@ class _AdmissionRequestSecondScreenState
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).admission}", "${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
), ),
AppText( AppText(
"${TranslationBase.of(context).request}", TranslationBase.of(context).request,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
) )
], ],
), ),
@ -122,7 +120,7 @@ class _AdmissionRequestSecondScreenState
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.postPlansEstimatedCost, .postPlansEstimatedCost,
fontFamily: 'Poppins', color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
@ -170,7 +168,7 @@ class _AdmissionRequestSecondScreenState
), ),
AppText( AppText(
TranslationBase.of(context).otherInformation, TranslationBase.of(context).otherInformation,
fontFamily: 'Poppins', color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -45,7 +46,7 @@ class LabResultChartAndDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Graph Details", TranslationBase.of(context).graphDetails,
fontSize: SizeConfig.textMultiplier * 2.1, fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',

File diff suppressed because it is too large Load Diff

@ -57,15 +57,15 @@ class VitalSignDetailsScreen extends StatelessWidget {
children: [ children: [
AppText( AppText(
"${patient.firstName ?? patient.patientDetails.firstName}'s", "${patient.firstName ?? patient.patientDetails.firstName}'s",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
), ),
AppText( AppText(
TranslationBase.of(context).vitalSign, TranslationBase.of(context).vitalSign,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3, fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
) )
], ],
), ),
@ -90,7 +90,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).yourBodyMassIndex} ${mode.bodyMax}", "${TranslationBase.of(context).yourBodyMassIndex} ${mode.bodyMax}",
fontFamily: 'Poppins', color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 2.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
@ -544,8 +544,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
.oxygenation, .oxygenation,
imagePath: imagePath:
"${assetBasePath}oxg.png", "${assetBasePath}oxg.png",
lastVal: mode.oxygenation, lastVal: "${mode.oxygenation}%",
unit: "%", unit: "",
), ),
), ),
InkWell( InkWell(
@ -576,198 +576,11 @@ class VitalSignDetailsScreen extends StatelessWidget {
imagePath: imagePath:
"${assetBasePath}painScale.png", "${assetBasePath}painScale.png",
lastVal: mode.painScore, lastVal: mode.painScore,
unit: "", unit: TranslationBase.of(context).severe,
),
),
],
),
/*RoundedContainer(
width: MediaQuery.of(context).size.width / 2,
margin: EdgeInsets.symmetric(
horizontal: 0.0, vertical: 16),
child: Container(
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(top: 8),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Expanded(
child: Container(
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).painScale}",
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painScore}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
"Location",
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painLocation}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
), ),
Row(
children: [
AppText(
"Character",
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painCharacter}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
), ),
], ],
), ),
Row(
children: [
AppText(
"Duration",
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painDuration}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).painManagement,
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.isPainDone}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context).frequency,
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${mode.painFrequency}",
fontSize: SizeConfig.textMultiplier * 1.3,
color: Colors.grey.shade700,
fontWeight: FontWeight.normal,
),
],
),
],
),
),
),
Container(
child: Image.asset(
"${assetBasePath}painScale.png",
width: 40,
height: 40,
))
],
),
),
Container(
child: Column(
children: [
Align(
alignment:
Alignment.topRight,
child: Icon(
EvaIcons.eye,
),
),
Align(
alignment:
Alignment.topLeft,
child: Container(
margin: EdgeInsets.only(
left: 5, right: 5),
child: AppText(
"${TranslationBase.of(context).painScale}",
fontFamily: 'Poppins',
fontSize: SizeConfig
.textMultiplier *
1.3,
fontWeight:
FontWeight.bold,
),
),
),
],
),
),
],
),
),
),*/
], ],
), ),
), ),

@ -52,6 +52,7 @@ class VitalSignItem extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
margin: 0, margin: 0,
), ),
Expanded( Expanded(
@ -62,7 +63,7 @@ class VitalSignItem extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.2, fontSize: SizeConfig.textMultiplier * 1.2,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFFB8382C), color: Color(0xFFD02127),
margin: 0, margin: 0,
), ),
], ],
@ -98,7 +99,7 @@ class VitalSignItem extends StatelessWidget {
margin: EdgeInsets.only(left: 5, right: 5), margin: EdgeInsets.only(left: 5, right: 5),
child: AppText( child: AppText(
"$des", "$des",
fontFamily: 'Poppins', color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.3, fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

@ -58,7 +58,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Graph Details", TranslationBase.of(context).graphDetails,
fontSize: SizeConfig.textMultiplier * 2.1, fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

@ -63,7 +63,7 @@ class VitalSingChartBloodPressure extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
"Graph Details", TranslationBase.of(context).graphDetails,
fontSize: SizeConfig.textMultiplier * 2.3, fontSize: SizeConfig.textMultiplier * 2.3,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',

@ -1247,6 +1247,8 @@ class TranslationBase {
String get acknowledged => String get acknowledged =>
localizedValues['acknowledged'][locale.languageCode]; localizedValues['acknowledged'][locale.languageCode];
String get didntCatch => localizedValues["didntCatch"][locale.languageCode]; String get didntCatch => localizedValues["didntCatch"][locale.languageCode];
String get severe => localizedValues["severe"][locale.languageCode];
String get graphDetails => localizedValues["graphDetails"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,9 +1,11 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatientProfileButton extends StatelessWidget { class PatientProfileButton extends StatelessWidget {
final String nameLine1; final String nameLine1;
@ -42,6 +44,8 @@ class PatientProfileButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectsProvider = Provider.of<ProjectViewModel>(context);
return new Container( return new Container(
margin: new EdgeInsets.symmetric(horizontal: 4.0), margin: new EdgeInsets.symmetric(horizontal: 4.0),
padding: EdgeInsets.fromLTRB(10, 10, 10, 5), padding: EdgeInsets.fromLTRB(10, 10, 10, 5),
@ -63,11 +67,11 @@ class PatientProfileButton extends StatelessWidget {
url + icon, url + icon,
width: 50, width: 50,
height: 50, height: 50,
)) ),)
], ],
)), )),
Container( Container(
alignment: Alignment.topLeft, alignment: projectsProvider.isArabic ? Alignment.topRight : Alignment.topLeft,
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:expandable/expandable.dart'; import 'package:expandable/expandable.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -30,7 +31,7 @@ class AppExpandableNotifier extends StatelessWidget {
header: Padding( header: Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Text( child: Text(
"See Graph Details", "${TranslationBase.of(context).graphDetails}",
style: TextStyle(fontWeight: FontWeight.bold), style: TextStyle(fontWeight: FontWeight.bold),
)), )),
collapsed: Text(''), collapsed: Text(''),

@ -48,7 +48,9 @@ class AppButton extends StatefulWidget {
class _AppButtonState extends State<AppButton> { class _AppButtonState extends State<AppButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return IgnorePointer( return Container(
height: MediaQuery.of(context).size.height * 0.075,
child: IgnorePointer(
ignoring: widget.loading ||widget.disabled, ignoring: widget.loading ||widget.disabled,
child: RawMaterialButton( child: RawMaterialButton(
fillColor: widget.disabled fillColor: widget.disabled
@ -114,6 +116,7 @@ class _AppButtonState extends State<AppButton> {
), ),
borderRadius: BorderRadius.all(Radius.circular(widget.radius))), borderRadius: BorderRadius.all(Radius.circular(widget.radius))),
), ),
),
); );
} }
} }

@ -4,20 +4,61 @@ import 'app_buttons_widget.dart';
class ButtonBottomSheet extends StatelessWidget { class ButtonBottomSheet extends StatelessWidget {
final double height; final GestureTapCallback onPressed;
final String buttonTitle; final String title;
final Function onPressed; final IconData iconData;
final Widget icon;
final Color color;
final double fontSize;
final double padding;
final Color fontColor;
final bool loading;
final bool disabled;
final FontWeight fontWeight;
final bool hasBorder;
final Color borderColor;
final double radius;
final double vPadding;
final double hPadding;
ButtonBottomSheet({@required this.height, @required this.buttonTitle, @required this.onPressed}); ButtonBottomSheet({@required this.onPressed,
this.title,
this.iconData,
this.icon,
this.color,
this.fontSize = 2,
this.padding = 13,
this.loading = false,
this.disabled = false,
this.fontColor = Colors.white,
this.fontWeight = FontWeight.normal,
this.vPadding = 0,
this.hPadding = 0,
this.radius = 8.0,
this.hasBorder = false,
this.borderColor,});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: height ?? null,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: AppButton( child: AppButton(
title: buttonTitle, title: title,
onPressed: onPressed, onPressed: onPressed,
fontWeight: fontWeight,
color: color,
fontSize: fontSize,
padding: padding,
disabled: disabled,
radius: radius,
hasBorder: hasBorder,
fontColor: fontColor,
icon: icon,
iconData: iconData,
hPadding: hPadding,
vPadding: vPadding,
borderColor: borderColor,
loading: loading,
), ),
); );
} }

@ -1,8 +1,10 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_field_error.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_field_error.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import '../app_texts_widget.dart'; import '../app_texts_widget.dart';
@ -50,10 +52,12 @@ class AppTextFieldCustom extends StatefulWidget {
class _AppTextFieldCustomState extends State<AppTextFieldCustom> { class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Column( return Column(
children: [ children: [
Container( Container(
height: widget.height != 0 ? widget.height + 8 : null, height: widget.height != 0 && widget.maxLines == 1 ? widget.height + 8 : null,
decoration: widget.hasBorder decoration: widget.hasBorder
? TextFieldsUtils.containerBorderDecoration( ? TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0Xffffffff),
@ -72,7 +76,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
child: Container( child: Container(
padding: widget.dropDownText == null padding: widget.dropDownText == null
? EdgeInsets.symmetric(vertical: 0) ? EdgeInsets.symmetric(vertical: 0)
: EdgeInsets.symmetric(vertical: 8), : EdgeInsets.symmetric(vertical: 0), // 8.0
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -82,20 +86,24 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
widget.dropDownText != null) widget.dropDownText != null)
AppText( AppText(
widget.hintText, widget.hintText,
fontFamily: 'Poppins', color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
widget.dropDownText == null widget.dropDownText == null
? TextField( ? Container(
textAlign: TextAlign.left, height: widget.height != 0 && widget.maxLines == 1 ? widget.height - 22 : null,
child: TextField(
textAlign: projectViewModel.isArabic
? TextAlign.right
: TextAlign.left,
decoration: decoration:
TextFieldsUtils.textFieldSelectorDecoration( TextFieldsUtils.textFieldSelectorDecoration(
widget.hintText, null, true), widget.hintText, null, true),
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.7, fontSize: SizeConfig.textMultiplier * 1.7,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Colors.grey.shade800, color: Color(0xFF575757),
), ),
controller: widget.controller, controller: widget.controller,
keyboardType: widget.inputType, keyboardType: widget.inputType,
@ -106,16 +114,17 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
? widget.inputFormatters ? widget.inputFormatters
: [], : [],
onChanged: (value) { onChanged: (value) {
setState(() {});
if (widget.onChanged != null) { if (widget.onChanged != null) {
widget.onChanged(value); widget.onChanged(value);
setState(() {});
} }
}, },
),
) )
: AppText( : AppText(
widget.dropDownText, widget.dropDownText,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Colors.grey.shade800, color: Color(0xFF575757),
fontSize: SizeConfig.textMultiplier * 1.7, fontSize: SizeConfig.textMultiplier * 1.7,
), ),
], ],

@ -566,7 +566,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3-nullsafety.1" version: "0.6.2"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save