fix first step from Soap

episode_fixes
Elham Rababh 5 years ago
parent 88b04a8f5d
commit 14a0911aec

@ -282,7 +282,7 @@ const Map<String, Map<String, String>> localizedValues = {
'indication': {'en': 'Indication', 'ar': 'دواعي الاستخدام'}, 'indication': {'en': 'Indication', 'ar': 'دواعي الاستخدام'},
'duration': {'en': 'Duration', 'ar': 'المدة الزمنية'}, 'duration': {'en': 'Duration', 'ar': 'المدة الزمنية'},
'instruction': {'en': 'Instructions', 'ar': 'إرشادات'}, 'instruction': {'en': 'Instructions', 'ar': 'إرشادات'},
'addMedication': {'en': 'ADD MEDICATION', 'ar': 'اضف الدواء'}, 'addMedication': {'en': 'Add Medication', 'ar': 'اضف الدواء'},
'route': {'en': 'Route', 'ar': 'المسار'}, 'route': {'en': 'Route', 'ar': 'المسار'},
'reschedule-leave': {'en': 'Reschedule and leaves', 'ar': 'إعادة الجدولة والأوراق'}, 'reschedule-leave': {'en': 'Reschedule and leaves', 'ar': 'إعادة الجدولة والأوراق'},
'no-reschedule-leave': {'en': 'No Reschedule and leaves', 'ar': 'لا إعادة جدولة ويغادر'}, 'no-reschedule-leave': {'en': 'No Reschedule and leaves', 'ar': 'لا إعادة جدولة ويغادر'},

@ -17,15 +17,31 @@ class SizeConfig {
static bool isPortrait = true; static bool isPortrait = true;
static bool isMobilePortrait = false; static bool isMobilePortrait = false;
static bool isMobile = false; static bool isMobile = false;
static bool isHeightShort = false;
static bool isHeightVeryShort = false;
static bool isHeightMiddle = false;
static bool isHeightLarge = false;
static bool isWidthLarge = false;
void init(BoxConstraints constraints, Orientation orientation) { void init(BoxConstraints constraints, Orientation orientation) {
realScreenHeight = constraints.maxHeight; realScreenHeight = constraints.maxHeight;
realScreenWidth = constraints.maxWidth; realScreenWidth = constraints.maxWidth;
if (constraints.maxWidth <= MAX_SMALL_SCREEN) { if (constraints.maxWidth <= MAX_SMALL_SCREEN) {
isMobile = true; isMobile = true;
} }
if (constraints.maxHeight < 600) {
isHeightVeryShort = true;
} else if (constraints.maxHeight < 800) {
isHeightShort = true;
} else if (constraints.maxHeight < 1000) {
isHeightMiddle = true;
} else {
isHeightLarge = true;
}
if (constraints.maxWidth > 600) {
isWidthLarge = true;
}
if (orientation == Orientation.portrait) { if (orientation == Orientation.portrait) {
isPortrait = true; isPortrait = true;
if (realScreenWidth < 450) { if (realScreenWidth < 450) {

@ -254,7 +254,7 @@ class AuthenticationViewModel extends BaseViewModel {
/// add  token to shared preferences in case of send activation code is success /// add  token to shared preferences in case of send activation code is success
setDataAfterSendActivationSuccess(SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) { setDataAfterSendActivationSuccess(SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) {
print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); // print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
// DrAppToastMsg.showSuccesToast("_VerificationCode_ : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); // DrAppToastMsg.showSuccesToast("_VerificationCode_ : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
sharedPref.setString(VIDA_AUTH_TOKEN_ID, sharedPref.setString(VIDA_AUTH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);

@ -71,321 +71,323 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
height: SizeConfig.realScreenHeight * .95, height: SizeConfig.realScreenHeight * .95,
width: SizeConfig.realScreenWidth, width: SizeConfig.realScreenWidth,
child: Column( child: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
SizedBox( children: <Widget>[
height: 80, SizedBox(
), height: 80,
if(authenticationViewModel.isFromLogin) ),
InkWell( if(authenticationViewModel.isFromLogin)
onTap: (){ InkWell(
authenticationViewModel.setUnverified(false,isFromLogin: false); onTap: (){
authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED); authenticationViewModel.setUnverified(false,isFromLogin: false);
}, authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED);
child: Icon(Icons.arrow_back_ios,color: Color(0xFF2B353E),) },
child: Icon(Icons.arrow_back_ios,color: Color(0xFF2B353E),)
),
Container(
child: Column(
children: <Widget>[
SizedBox(
height: 20,
),
authenticationViewModel.user != null && isMoreOption == false
? Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).welcomeBack,
fontSize:12,
fontWeight: FontWeight.w700,
color: Color(0xFF2B353E),
),
AppText(
Helpers.capitalize(authenticationViewModel.user.doctorName),
fontSize: 24,
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context).accountInfo ,
fontSize: 16,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w600,
),
SizedBox(
height: 20,
),
Container(
padding: EdgeInsets.all(15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.1),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
children: [
Text(
TranslationBase.of(context)
.lastLoginAt,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontFamily: 'Poppins',
fontSize: 16,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,),
),
Row(
children: [
AppText(
TranslationBase
.of(context)
.verifyWith,
fontSize: 14,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
AppText(
authenticationViewModel.getType(
authenticationViewModel.user
.logInTypeID,
context),
fontSize: 14,
color: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
],
)
],
crossAxisAlignment: CrossAxisAlignment.start,),
Column(children: [
AppText(
authenticationViewModel.user.editedOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(
authenticationViewModel.user
.editedOn))
: authenticationViewModel.user.createdOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(authenticationViewModel.user
.createdOn))
: '--',
textAlign:
TextAlign.right,
fontSize: 13,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
),
AppText(
authenticationViewModel.user.editedOn !=
null
? AppDateUtils.getHour(
AppDateUtils.convertStringToDate(
authenticationViewModel.user
.editedOn))
: authenticationViewModel.user.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils.convertStringToDate(authenticationViewModel.user
.createdOn))
: '--',
textAlign:
TextAlign.right,
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
)
],
crossAxisAlignment: CrossAxisAlignment.start,
) ),
], Container(
),
), child: Column(
SizedBox( children: <Widget>[
height: 20, SizedBox(
), height: 20,
Row( ),
children: [ authenticationViewModel.user != null && isMoreOption == false
AppText( ? Column(
"Please Verify",
fontSize: 16,
color: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
],
)
],
)
: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceEvenly, MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
this.onlySMSBox == false
? Container( AppText(
margin: EdgeInsets.only(bottom: 20, top: 30), TranslationBase.of(context).welcomeBack,
child: AppText( fontSize:12,
TranslationBase.of(context) fontWeight: FontWeight.w700,
.verifyLoginWith, color: Color(0xFF2B353E),
fontSize: 18, ),
color: Color(0xFF2E303A), AppText(
Helpers.capitalize(authenticationViewModel.user.doctorName),
fontSize: 24,
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.left,
), ),
) SizedBox(
: AppText( height: 20,
TranslationBase.of(context) ),
.verifyFingerprint2, AppText(
fontSize: TranslationBase.of(context).accountInfo ,
SizeConfig.textMultiplier * 2.5, fontSize: 16,
textAlign: TextAlign.start, color: Color(0xFF2E303A),
fontWeight: FontWeight.w600,
),
SizedBox(
height: 20,
),
Container(
padding: EdgeInsets.all(15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.1),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
children: [
Text(
TranslationBase.of(context)
.lastLoginAt,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontFamily: 'Poppins',
fontSize: 16,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,),
),
Row(
children: [
AppText(
TranslationBase
.of(context)
.verifyWith,
fontSize: 14,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
AppText(
authenticationViewModel.getType(
authenticationViewModel.user
.logInTypeID,
context),
fontSize: 14,
color: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
],
)
],
crossAxisAlignment: CrossAxisAlignment.start,),
Column(children: [
AppText(
authenticationViewModel.user.editedOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(
authenticationViewModel.user
.editedOn))
: authenticationViewModel.user.createdOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate(authenticationViewModel.user
.createdOn))
: '--',
textAlign:
TextAlign.right,
fontSize: 13,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
),
AppText(
authenticationViewModel.user.editedOn !=
null
? AppDateUtils.getHour(
AppDateUtils.convertStringToDate(
authenticationViewModel.user
.editedOn))
: authenticationViewModel.user.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils.convertStringToDate(authenticationViewModel.user
.createdOn))
: '--',
textAlign:
TextAlign.right,
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xFF575757),
)
],
crossAxisAlignment: CrossAxisAlignment.start,
)
],
),
),
SizedBox(
height: 20,
), ),
]),
authenticationViewModel.user != null && isMoreOption == false
? Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row( Row(
children: [
AppText(
"Please Verify",
fontSize: 16,
color: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
],
)
],
)
: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
this.onlySMSBox == false
? Container(
margin: EdgeInsets.only(bottom: 20, top: 30),
child: AppText(
TranslationBase.of(context)
.verifyLoginWith,
fontSize: 18,
color: Color(0xFF2E303A),
fontWeight: FontWeight.bold,
textAlign: TextAlign.left,
),
)
: AppText(
TranslationBase.of(context)
.verifyFingerprint2,
fontSize:
SizeConfig.textMultiplier * 2.5,
textAlign: TextAlign.start,
),
]),
authenticationViewModel.user != null && isMoreOption == false
? Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: InkWell(
onTap: () =>
{
// TODO check this logic it seem it will create bug to us
authenticateUser(
AuthMethodTypes
.Fingerprint, true)
},
child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel,
authMethodType: SelectedAuthMethodTypesService
.getMethodsTypeService(
authenticationViewModel.user
.logInTypeID),
authenticateUser:
(AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType,
isActive),
)),
),
Expanded(
child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel,
authMethodType:
AuthMethodTypes.MoreOptions,
onShowMore: () {
setState(() {
isMoreOption = true;
});
},
))
]),
])
: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: InkWell( child: VerificationMethodsList(
onTap: () => authenticationViewModel:authenticationViewModel,
{ authMethodType:
// TODO check this logic it seem it will create bug to us AuthMethodTypes.Fingerprint,
authenticateUser( authenticateUser:
AuthMethodTypes (AuthMethodTypes
.Fingerprint, true) authMethodType,
}, isActive) =>
child: VerificationMethodsList( authenticateUser(
authenticationViewModel:authenticationViewModel, authMethodType,
authMethodType: SelectedAuthMethodTypesService isActive),
.getMethodsTypeService( )),
authenticationViewModel.user
.logInTypeID),
authenticateUser:
(AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType,
isActive),
)),
),
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel, authenticationViewModel:authenticationViewModel,
authMethodType: authMethodType:
AuthMethodTypes.MoreOptions, AuthMethodTypes.FaceID,
onShowMore: () { authenticateUser:
setState(() { (AuthMethodTypes
isMoreOption = true; authMethodType,
}); isActive) =>
}, authenticateUser(
authMethodType,
isActive),
)) ))
]), ],
]) )
: Column( : SizedBox(),
mainAxisAlignment: MainAxisAlignment.start, Row(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment:
children: <Widget>[ MainAxisAlignment.center,
onlySMSBox == false children: <Widget>[
? Row( Expanded(
mainAxisAlignment: child: VerificationMethodsList(
MainAxisAlignment.center, authenticationViewModel:authenticationViewModel,
children: <Widget>[ authMethodType: AuthMethodTypes
Expanded( .SMS,
child: VerificationMethodsList( authenticateUser:
authenticationViewModel:authenticationViewModel, (
authMethodType: AuthMethodTypes authMethodType,
AuthMethodTypes.Fingerprint, isActive) =>
authenticateUser: authenticateUser(
(AuthMethodTypes authMethodType, isActive),
authMethodType, )),
isActive) => Expanded(
authenticateUser( child: VerificationMethodsList(
authMethodType, authenticationViewModel:authenticationViewModel,
isActive), authMethodType:
)), AuthMethodTypes.WhatsApp,
Expanded( authenticateUser:
child: VerificationMethodsList( (
authenticationViewModel:authenticationViewModel, AuthMethodTypes authMethodType,
authMethodType: isActive) =>
AuthMethodTypes.FaceID, authenticateUser(
authenticateUser: authMethodType, isActive),
(AuthMethodTypes ))
authMethodType, ],
isActive) => ),
authenticateUser( ]),
authMethodType,
isActive),
))
],
)
: SizedBox(),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel,
authMethodType: AuthMethodTypes
.SMS,
authenticateUser:
(
AuthMethodTypes authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
)),
Expanded(
child: VerificationMethodsList(
authenticationViewModel:authenticationViewModel,
authMethodType:
AuthMethodTypes.WhatsApp,
authenticateUser:
(
AuthMethodTypes authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
))
],
),
]),
// ) // )
], ],
),
), ),
), ],
], ),
), ),
), ),
), ),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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';
@ -35,14 +36,14 @@ class SOAPOpenItems extends StatelessWidget {
children: [ children: [
AppText( AppText(
"$label", "$label",
fontSize:15, fontSize:SizeConfig.getTextMultiplierBasedOnWidth()*4.5,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
letterSpacing:-0.44 , letterSpacing:-0.44 ,
), ),
AppText( AppText(
"${TranslationBase.of(context).searchHere}", "${TranslationBase.of(context).searchHere}",
fontSize:14, fontSize:SizeConfig.getTextMultiplierBasedOnWidth()*3.5,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Color(0xFF575757), color: Color(0xFF575757),
letterSpacing:-0.56 , letterSpacing:-0.56 ,

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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';
@ -21,14 +22,14 @@ class SOAPStepHeader extends StatelessWidget {
SizedBox(height: 15,), SizedBox(height: 15,),
AppText( AppText(
TranslationBase.of(context).createNew, TranslationBase.of(context).createNew,
fontSize: 12, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
letterSpacing:-0.72, letterSpacing:-0.72,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
), ),
AppText(TranslationBase.of(context).episode, AppText(TranslationBase.of(context).episode,
fontSize: 24, fontSize:SizeConfig.getTextMultiplierBasedOnWidth() * 8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing:-1.44, letterSpacing:-1.44,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
@ -41,7 +42,8 @@ class SOAPStepHeader extends StatelessWidget {
), ),
), ),
SizedBox( SizedBox(
height: 30, height:SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 1 : 2),
), ),
], ],
); );

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -19,7 +20,7 @@ class BottomSheetDialogButton extends StatelessWidget {
), ),
border: Border.all(color: HexColor('#EFEFEF'), width: 1), border: Border.all(color: HexColor('#EFEFEF'), width: 1),
), ),
height: MediaQuery.of(context).size.height * 0.1, height: SizeConfig.heightMultiplier * 12,
width: double.infinity, width: double.infinity,
child: Column( child: Column(
children: [ children: [
@ -31,6 +32,8 @@ class BottomSheetDialogButton extends StatelessWidget {
widthFactor: .80, widthFactor: .80,
child: Center( child: Center(
child: AppButton( child: AppButton(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
title: label, title: label,
padding: 10, padding: 10,
color: Color(0xFF359846), color: Color(0xFF359846),

@ -1,58 +1,62 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget { class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget {
const BottomSheetTitle({ BottomSheetTitle({
Key key, this.title, Key key, this.title,
}) : super(key: key); }) : super(key: key);
final String title; final String title;
double headerHeight = SizeConfig.getTextMultiplierBasedOnWidth()*35;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.only( // padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5), // left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: 115, height: headerHeight,
child: Container( child: Center(
padding: EdgeInsets.only( child: Container(
left: 10, right: 10), padding: EdgeInsets.only(
margin: EdgeInsets.only(top: 60), left: 10, right: 10),
child: Column( margin: EdgeInsets.only(top: headerHeight *0.5),
children: [ child: Column(
Row( children: [
mainAxisAlignment: Row(
MainAxisAlignment.spaceBetween, mainAxisAlignment:
children: [ MainAxisAlignment.spaceBetween,
RichText( children: [
text: TextSpan( RichText(
style: TextStyle( text: TextSpan(
fontSize:20, style: TextStyle(
color: Colors.black), fontSize:20,
children: <TextSpan>[ color: Colors.black),
new TextSpan( children: <TextSpan>[
new TextSpan(
text: title, text: title,
style: TextStyle( style: TextStyle(
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 22)), fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*6)),
], ],
),
), ),
), InkWell(
InkWell( onTap: () {
onTap: () { Navigator.pop(context);
Navigator.pop(context); },
}, child: Icon(DoctorApp.close_1,
child: Icon(DoctorApp.close_1, size:SizeConfig.getTextMultiplierBasedOnWidth()*5,
size:20, color: Color(0xFF2B353E)))
color: Color(0xFF2B353E))) ],
], ),
), ],
], ),
), ),
), ),
); );

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.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/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
@ -19,7 +20,7 @@ class ExpandableSOAPWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.symmetric(vertical: 20, horizontal: 10), padding: EdgeInsets.symmetric(vertical: SizeConfig.isHeightVeryShort ?10:20, horizontal: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
@ -41,14 +42,14 @@ class ExpandableSOAPWidget extends StatelessWidget {
children: [ children: [
AppText(headerTitle, AppText(headerTitle,
variant: isExpanded ? "bodyText" : '', variant: isExpanded ? "bodyText" : '',
fontSize: 16, fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*5,
letterSpacing:-0.64, letterSpacing:-0.64,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),), color: Color(0xFF2E303A),),
if(isRequired) if(isRequired)
Icon( Icon(
FontAwesomeIcons.asterisk, FontAwesomeIcons.asterisk,
size: 12, size: SizeConfig.getTextMultiplierBasedOnWidth()*2.5,
) )
], ],
), ),

@ -39,7 +39,7 @@ class StatusLabel extends StatelessWidget {
: TranslationBase.of(context).locked, : TranslationBase.of(context).locked,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7,
color: stepId == selectedStepId color: stepId == selectedStepId
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: stepId < selectedStepId : stepId < selectedStepId

@ -20,6 +20,8 @@ class StepsWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
double containerHeight = (SizeConfig.isHeightVeryShort ?30:SizeConfig.isHeightShort?38:38);
double circleTop = (SizeConfig.isHeightVeryShort ?12:SizeConfig.isHeightShort?10:10);
return !projectViewModel.isArabic return !projectViewModel.isArabic
? Stack( ? Stack(
children: [ children: [
@ -45,7 +47,7 @@ class StepsWidget extends StatelessWidget {
), ),
),), ),),
Positioned( Positioned(
top: 10, top: circleTop,
left: 0, left: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
@ -53,8 +55,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: 38, width:containerHeight,
height: 38, height: containerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 0 border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -92,7 +94,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 10, top: circleTop,
left: MediaQuery left: MediaQuery
.of(context) .of(context)
.size .size
@ -103,8 +105,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: 38, width: containerHeight,
height: 38, height: containerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 1 border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -144,7 +146,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 10, top: circleTop,
left: MediaQuery left: MediaQuery
.of(context) .of(context)
.size .size
@ -157,8 +159,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: 38, width:containerHeight,
height: 38, height: containerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 2 border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -198,7 +200,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 10, top: circleTop,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null, onTap: () => index >= 3 ? changeCurrentTab(4) : null,
@ -206,8 +208,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Container( Container(
width: 38, width:containerHeight,
height: 38, height: containerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 3 border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -272,7 +274,7 @@ class StepsWidget extends StatelessWidget {
), ),
),), ),),
Positioned( Positioned(
top: 10, top: circleTop,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
@ -280,8 +282,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: 38, width:containerHeight,
height: 38, height: containerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 0 border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -318,7 +320,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 10, top: circleTop,
right: MediaQuery right: MediaQuery
.of(context) .of(context)
.size .size
@ -329,8 +331,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: 38, width:containerHeight,
height: 38, height: containerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 1 border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -367,7 +369,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 10, top: circleTop,
right: MediaQuery right: MediaQuery
.of(context) .of(context)
.size .size
@ -378,8 +380,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: 38, width:containerHeight,
height: 38, height: containerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 2 border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -421,7 +423,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 10, top: circleTop,
left: 0, left: 0,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null, onTap: () => index >= 3 ? changeCurrentTab(4) : null,
@ -429,8 +431,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Container( Container(
width: 38, width:containerHeight,
height: 38, height: containerHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 3 border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)

@ -1,7 +1,9 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
@ -73,7 +75,7 @@ class _AddAllergiesItemState extends State<AddAllergiesItem> {
onTapItem(); onTapItem();
}), }),
InkWell( InkWell(
onTap:onTapItem, onTap: onTapItem,
child: Container( child: Container(
child: AppText( child: AppText(
projectViewModel.isArabic projectViewModel.isArabic
@ -82,8 +84,7 @@ class _AddAllergiesItemState extends State<AddAllergiesItem> {
: widget.item.nameEn : widget.item.nameEn
: widget.item.nameEn, : widget.item.nameEn,
color: Color(0xFF575757), color: Color(0xFF575757),
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.8,
fontWeight: FontWeight.w600,
letterSpacing: -0.56, letterSpacing: -0.56,
), ),
width: MediaQuery.of(context).size.width * 0.55, width: MediaQuery.of(context).size.width * 0.55,
@ -92,22 +93,22 @@ class _AddAllergiesItemState extends State<AddAllergiesItem> {
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
if (mySelectedAllergy != null) { if (mySelectedAllergy != null) {
setState(() { setState(() {
mySelectedAllergy.isExpanded = mySelectedAllergy.isExpanded =
mySelectedAllergy.isExpanded ? false : true; mySelectedAllergy.isExpanded ? false : true;
}); });
} }
}, },
child: Icon((mySelectedAllergy != null child: Icon(
? mySelectedAllergy.isExpanded (mySelectedAllergy != null ? mySelectedAllergy.isExpanded : false)
: false)
? EvaIcons.arrowIosUpwardOutline ? EvaIcons.arrowIosUpwardOutline
: EvaIcons.arrowIosDownwardOutline, : EvaIcons.arrowIosDownwardOutline,
color: Color(0xFF575757) , color: Color(0xFF575757),
),) size: 20,
),
)
], ],
), ),
bodyWidget: Center( bodyWidget: Center(
@ -143,8 +144,9 @@ class _AddAllergiesItemState extends State<AddAllergiesItem> {
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
hintText: TranslationBase.of(context).selectSeverity + "*", hintText: TranslationBase.of(context).selectSeverity + "*",
enabled: false, enabled: false,
maxLines: 2, maxLines: 1,
minLines: 2, minLines: 1,
height: Helpers.getTextFieldHeight(),
validationError: mySelectedAllergy != null && validationError: mySelectedAllergy != null &&
mySelectedAllergy.selectedAllergySeverity == null && mySelectedAllergy.selectedAllergySeverity == null &&
mySelectedAllergy.hasValidationError mySelectedAllergy.hasValidationError
@ -161,11 +163,10 @@ class _AddAllergiesItemState extends State<AddAllergiesItem> {
maxLines: 25, maxLines: 25,
minLines: 3, minLines: 3,
hasBorder: true, hasBorder: true,
onChanged: (value){ onChanged: (value) {
mySelectedAllergy.remark = value; mySelectedAllergy.remark = value;
}, },
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
@ -180,18 +181,18 @@ class _AddAllergiesItemState extends State<AddAllergiesItem> {
); );
} }
onTapItem(){ onTapItem() {
setState(() { setState(() {
if (widget.isServiceSelected(widget.item)) { if (widget.isServiceSelected(widget.item)) {
widget.removeAllergy(widget.item); widget.removeAllergy(widget.item);
} else { } else {
MySelectedAllergy mySelectedAllergy = MySelectedAllergy mySelectedAllergy =
SoapUtils.generateMySelectedAllergy( SoapUtils.generateMySelectedAllergy(
allergy: widget.item, allergy: widget.item,
allergySeverity: _selectedAllergySeverity, allergySeverity: _selectedAllergySeverity,
remark: null, remark: null,
isChecked: true, isChecked: true,
isExpanded: true); isExpanded: true);
widget.addAllergy(mySelectedAllergy); widget.addAllergy(mySelectedAllergy);
} }
}); });

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
@ -58,7 +59,7 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.70, height: Helpers.getTextFieldHeight(),
child: Center( child: Center(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/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/core/viewModel/project_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -67,8 +68,7 @@ class _PriorityBarState extends State<PriorityBar> {
: item, : item,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*3.5,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

@ -1,5 +1,6 @@
// ignore: must_be_immutable // ignore: must_be_immutable
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
@ -8,6 +9,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -53,7 +55,6 @@ class _AddMedicationState extends State<AddMedication> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
final screenSize = MediaQuery.of(context).size;
return FractionallySizedBox( return FractionallySizedBox(
child: BaseView<SOAPViewModel>( child: BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
@ -75,340 +76,367 @@ class _AddMedicationState extends State<AddMedication> {
await model.getMedicationList(); await model.getMedicationList();
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: BottomSheetTitle( appBar: BottomSheetTitle(
title: TranslationBase.of(context).addMedication, title: TranslationBase.of(context).addMedication,
), ),
body: Center( body: Center(
child: Container( child: Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 10, height: 10,
), ),
SizedBox( Expanded(
height: 16,
),
Expanded(
child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: SingleChildScrollView(
children: [ child: Column(
SizedBox( children: [
height: 16, SizedBox(
), height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ?2:SizeConfig.isHeightShort?2:2),
SizedBox( ),
height: 16, Container(
), // height: screenSize.height * 0.070,
Container( child: InkWell(
// height: screenSize.height * 0.070, onTap: model.allMedicationList != null
child: InkWell( ? () {
onTap: model.allMedicationList != null setState(() {
_selectedMedication = null;
});
}
: null,
child: _selectedMedication == null
? CustomAutoCompleteTextField(
isShowError: isFormSubmitted &&
_selectedMedication == null,
child: AutoCompleteTextField<
GetMedicationResponseModel>(
decoration: TextFieldsUtils
.textFieldSelectorDecoration(
TranslationBase.of(
context)
.searchMedicineNameHere,
null,
true,
suffixIcon:
Icons.search),
itemSubmitted: (item) =>
setState(() =>
_selectedMedication =
item),
key: key,
suggestions:
model.allMedicationList,
itemBuilder: (context,
suggestion) =>
new Padding(
child: AppText(suggestion
.description +
'/' +
suggestion
.genericName),
padding:
EdgeInsets.all(
8.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion,
input) =>
suggestion.genericName.toLowerCase().startsWith(input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(input
.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(input
.toLowerCase()),
),
)
: AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
hintText: _selectedMedication !=
null
? _selectedMedication
.description +
(' (${_selectedMedication.genericName} )')
: TranslationBase.of(
context)
.searchMedicineNameHere,
minLines: 1,
maxLines: 1,
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.grey.shade600,
)),
enabled: false,
),
),
),
SizedBox(
height: 5,
),
AppTextFieldCustom(
height: Helpers.getTextFieldHeight(),
enabled: false,
onClick: model.medicationDoseTimeList !=
null
? () { ? () {
setState(() { MasterKeyDailog dialog =
_selectedMedication = null; MasterKeyDailog(
}); list: model
.medicationDoseTimeList,
okText:
TranslationBase.of(context)
.ok,
selectedValue:
_selectedMedicationDose,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationDose =
selectedValue;
doseController
.text = projectViewModel
.isArabic
? _selectedMedicationDose
.nameAr
: _selectedMedicationDose
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder:
(BuildContext context) {
return dialog;
},
);
} }
: null, : null,
child: _selectedMedication == null hintText:
? CustomAutoCompleteTextField( TranslationBase.of(context).doseTime,
isShowError: isFormSubmitted && maxLines: 1,
_selectedMedication == null, minLines: 1,
child: AutoCompleteTextField< isTextFieldHasSuffix: true,
GetMedicationResponseModel>( controller: doseController,
decoration: TextFieldsUtils validationError: isFormSubmitted &&
.textFieldSelectorDecoration( _selectedMedicationDose == null
TranslationBase.of( ? TranslationBase.of(context)
context) .emptyMessage
.searchMedicineNameHere, : null,
null,
true,
suffixIcon: Icons.search),
itemSubmitted: (item) => setState(
() => _selectedMedication =
item),
key: key,
suggestions:
model.allMedicationList,
itemBuilder: (context,
suggestion) =>
new Padding(
child: AppText(suggestion
.description +
'/' +
suggestion
.genericName),
padding:
EdgeInsets.all(8.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion, input) =>
suggestion.genericName.toLowerCase().startsWith(
input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(input
.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(
input.toLowerCase()),
),
)
: AppTextFieldCustom(
hintText: _selectedMedication !=
null
? _selectedMedication
.description +
(' (${_selectedMedication.genericName} )')
: TranslationBase.of(context)
.searchMedicineNameHere,
minLines: 2,
maxLines: 2,
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
icon: Icon(
Icons.search,
color: Colors.grey.shade600,
)),
enabled: false,
),
), ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), AppTextFieldCustom(
AppTextFieldCustom( height: Helpers.getTextFieldHeight(),
enabled: false, enabled: false,
onClick: model.medicationDoseTimeList != null isTextFieldHasSuffix: true,
? () { onClick: model.medicationStrengthList !=
MasterKeyDailog dialog = null
MasterKeyDailog( ? () {
list: model.medicationDoseTimeList, MasterKeyDailog dialog =
okText: MasterKeyDailog(
TranslationBase.of(context).ok, list: model
selectedValue: _selectedMedicationDose, .medicationStrengthList,
okFunction: (selectedValue) { okText:
setState(() { TranslationBase.of(context)
_selectedMedicationDose = .ok,
selectedValue; selectedValue:
_selectedMedicationStrength,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationStrength =
selectedValue;
doseController strengthController
.text = projectViewModel .text = projectViewModel
.isArabic .isArabic
? _selectedMedicationDose ? _selectedMedicationStrength
.nameAr .nameAr
: _selectedMedicationDose : _selectedMedicationStrength
.nameEn; .nameEn;
}); });
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
context: context, context: context,
builder: (BuildContext context) { builder:
return dialog; (BuildContext context) {
}, return dialog;
); },
} );
: null, }
hintText: : null,
TranslationBase.of(context).doseTime, hintText:
maxLines: 2, TranslationBase.of(context).strength,
minLines: 2, maxLines: 1,
isTextFieldHasSuffix: true, minLines: 1,
controller: doseController, controller: strengthController,
validationError: isFormSubmitted && validationError: isFormSubmitted &&
_selectedMedicationDose == null _selectedMedicationStrength ==
? TranslationBase.of(context).emptyMessage null
: null, ? TranslationBase.of(context)
), .emptyMessage
SizedBox( : null,
height: 5, ),
), SizedBox(
AppTextFieldCustom( height: 5,
enabled: false, ),
isTextFieldHasSuffix: true, SizedBox(
onClick: model.medicationStrengthList != null height: 5,
? () { ),
MasterKeyDailog dialog = AppTextFieldCustom(
MasterKeyDailog( height: Helpers.getTextFieldHeight(),
list: model.medicationStrengthList, enabled: false,
okText: isTextFieldHasSuffix: true,
TranslationBase.of(context).ok, onClick: model.medicationRouteList != null
selectedValue: _selectedMedicationStrength, ? () {
okFunction: (selectedValue) { MasterKeyDailog dialog =
setState(() { MasterKeyDailog(
_selectedMedicationStrength = list: model.medicationRouteList,
selectedValue; selectedValue:
_selectedMedicationRoute,
okText:
TranslationBase.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationRoute =
selectedValue;
strengthController routeController
.text = projectViewModel .text = projectViewModel
.isArabic .isArabic
? _selectedMedicationStrength ? _selectedMedicationRoute
.nameAr .nameAr
: _selectedMedicationStrength : _selectedMedicationRoute
.nameEn; .nameEn;
}); });
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
context: context, context: context,
builder: (BuildContext context) { builder:
return dialog; (BuildContext context) {
}, return dialog;
); },
} );
: null, }
hintText: : null,
TranslationBase.of(context).strength, hintText:
maxLines: 2, TranslationBase.of(context).route,
minLines: 2, maxLines: 1,
controller: strengthController, minLines: 1,
validationError: isFormSubmitted && controller: routeController,
_selectedMedicationStrength == null validationError: isFormSubmitted &&
? TranslationBase.of(context).emptyMessage _selectedMedicationRoute == null
: null, ? TranslationBase.of(context)
), .emptyMessage
SizedBox( : null,
height: 5, ),
), SizedBox(
SizedBox( height: 5,
height: 5, ),
), SizedBox(
AppTextFieldCustom( height: 5,
enabled: false, ),
isTextFieldHasSuffix: true, AppTextFieldCustom(
onClick: model.medicationRouteList != null height: Helpers.getTextFieldHeight(),
? () { onClick: model.medicationFrequencyList !=
MasterKeyDailog dialog = null
MasterKeyDailog( ? () {
list: model.medicationRouteList, MasterKeyDailog dialog =
selectedValue: _selectedMedicationRoute, MasterKeyDailog(
okText: list: model
TranslationBase.of(context).ok, .medicationFrequencyList,
okFunction: (selectedValue) { okText:
setState(() { TranslationBase.of(context)
_selectedMedicationRoute = .ok,
selectedValue; selectedValue:
_selectedMedicationFrequency,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationFrequency =
selectedValue;
routeController frequencyController
.text = projectViewModel .text = projectViewModel
.isArabic .isArabic
? _selectedMedicationRoute ? _selectedMedicationFrequency
.nameAr .nameAr
: _selectedMedicationRoute : _selectedMedicationFrequency
.nameEn; .nameEn;
}); });
}, },
); );
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
context: context, context: context,
builder: (BuildContext context) { builder:
return dialog; (BuildContext context) {
}, return dialog;
); },
} );
: null, }
hintText: TranslationBase.of(context).route, : null,
maxLines: 2, hintText:
minLines: 2, TranslationBase.of(context).frequency,
controller: routeController, enabled: false,
validationError: isFormSubmitted && maxLines: 1,
_selectedMedicationRoute == null minLines: 1,
? TranslationBase.of(context).emptyMessage isTextFieldHasSuffix: true,
: null, controller: frequencyController,
), validationError: isFormSubmitted &&
SizedBox( _selectedMedicationFrequency ==
height: 5, null
), ? TranslationBase.of(context)
SizedBox( .emptyMessage
height: 5, : null,
), ),
AppTextFieldCustom( SizedBox(
onClick: model.medicationFrequencyList != null height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ?20:SizeConfig.isHeightShort?15:10),
? () { ),
MasterKeyDailog dialog =
MasterKeyDailog(
list: model.medicationFrequencyList,
okText:
TranslationBase.of(context).ok,
selectedValue: _selectedMedicationFrequency,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationFrequency =
selectedValue;
frequencyController ],
.text = projectViewModel ),
.isArabic
? _selectedMedicationFrequency
.nameAr
: _selectedMedicationFrequency
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase.of(context).frequency,
enabled: false,
maxLines: 2,
minLines: 2,
isTextFieldHasSuffix: true,
controller: frequencyController,
validationError: isFormSubmitted &&
_selectedMedicationFrequency == null
? TranslationBase.of(context).emptyMessage
: null,
),
SizedBox(
height: 5,
),
SizedBox(
height: 30,
),
],
)), )),
), ),
), ]),
]), ),
), ),
), bottomSheet: model.state == ViewState.Busy
bottomSheet:model.state == ViewState.Busy?Container(height: 0,): ? Container(
BottomSheetDialogButton( height: 0,
label: TranslationBase.of(context) )
.addMedication : BottomSheetDialogButton(
.toUpperCase(), label:
onTap: () { TranslationBase.of(context).addMedication,
setState(() { onTap: () {
isFormSubmitted = true; setState(() {
}); isFormSubmitted = true;
if (_selectedMedication != null && });
_selectedMedicationDose != null && if (_selectedMedication != null &&
_selectedMedicationStrength != null && _selectedMedicationDose != null &&
_selectedMedicationRoute != null && _selectedMedicationStrength != null &&
_selectedMedicationFrequency != null) { _selectedMedicationRoute != null &&
widget.medicationController.text = widget _selectedMedicationFrequency != null) {
.medicationController.text + widget.medicationController.text = widget
'${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n'; .medicationController.text +
Navigator.of(context).pop(); '${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n';
} Navigator.of(context).pop();
}, }
) },
), )),
), ),
); );
} }

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -268,7 +269,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
isExpanded: isChiefExpand, isExpanded: isChiefExpand,
), ),
SizedBox( SizedBox(
height: 30, height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 4 : 2),
), ),
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).histories, headerTitle: TranslationBase.of(context).histories,
@ -286,7 +288,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
isExpanded: isHistoryExpand, isExpanded: isHistoryExpand,
), ),
SizedBox( SizedBox(
height: 30, height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 4 : 2),
), ),
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).allergiesSoap, headerTitle: TranslationBase.of(context).allergiesSoap,
@ -309,7 +312,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
isExpanded: isAllergiesExpand, isExpanded: isAllergiesExpand,
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.16, height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 20 : 10),
), ),
], ],
), ),
@ -324,7 +328,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
), ),
border: Border.all(color: HexColor('#707070'), width: 0), border: Border.all(color: HexColor('#707070'), width: 0),
), ),
height: 80, height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 12 : 10),
width: double.infinity, width: double.infinity,
child: Column( child: Column(
children: [ children: [
@ -338,7 +343,10 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
child: AppButton( child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
color: Colors.red[700], color: Colors.red[700],
padding: 10,
// loading: model.state == ViewState.BusyLocal, // loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
addSubjectiveInfo( addSubjectiveInfo(

@ -277,4 +277,7 @@ class Helpers {
String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60)); String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
return "$twoDigitMinutes:$twoDigitSeconds"; return "$twoDigitMinutes:$twoDigitSeconds";
} }
static double getTextFieldHeight(){
return SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ?10:SizeConfig.isHeightShort?8:6);
}
} }

@ -22,6 +22,7 @@ class AppButton extends StatefulWidget {
final double radius; final double radius;
final double vPadding; final double vPadding;
final double hPadding; final double hPadding;
final double height;
AppButton({ AppButton({
@required this.onPressed, @required this.onPressed,
@ -40,6 +41,7 @@ class AppButton extends StatefulWidget {
this.radius = 8.0, this.radius = 8.0,
this.hasBorder = false, this.hasBorder = false,
this.borderColor, this.borderColor,
this.height,
}); });
_AppButtonState createState() => _AppButtonState(); _AppButtonState createState() => _AppButtonState();
@ -50,6 +52,7 @@ class _AppButtonState extends State<AppButton> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
// height: MediaQuery.of(context).size.height * 0.075, // height: MediaQuery.of(context).size.height * 0.075,
height: widget.height,
child: IgnorePointer( child: IgnorePointer(
ignoring: widget.loading ||widget.disabled, ignoring: widget.loading ||widget.disabled,
child: RawMaterialButton( child: RawMaterialButton(

@ -1,6 +1,8 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -75,7 +77,7 @@ class _MasterKeyCheckboxSearchWidgetState
child: ListView( child: ListView(
children: [ children: [
AppTextFieldCustom( AppTextFieldCustom(
height: MediaQuery.of(context).size.height * 0.070, height: Helpers.getTextFieldHeight(),//MediaQuery.of(context).size.height * 0.070,
hintText: TranslationBase.of(context).searchHistory, hintText: TranslationBase.of(context).searchHistory,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
hasBorder: false, hasBorder: false,
@ -133,8 +135,7 @@ class _MasterKeyCheckboxSearchWidgetState
: historyInfo.nameEn, : historyInfo.nameEn,
color: Color(0xFF575757), color: Color(0xFF575757),
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*3.8,
fontWeight: FontWeight.w600,
letterSpacing: -0.56, letterSpacing: -0.56,
), ),
), ),

@ -158,7 +158,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
? widget.inputFormatters ? widget.inputFormatters
: [], : [],
onChanged: (value) { onChanged: (value) {
// setState(() {}); setState(() {});
if (widget.onChanged != null) { if (widget.onChanged != null) {
widget.onChanged(value); widget.onChanged(value);
} }

Loading…
Cancel
Save