Merge branch 'doctor-app-design' into 'development'

referral screen design fix

See merge request Cloud_Solution/doctor_app_flutter!923
merge-requests/924/merge
Elham Ali 4 years ago
commit 6375d9fb2d

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/screens/qr_reader/QR_reader_screen.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_drawer_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.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/bottom_nav_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -41,7 +42,13 @@ class _LandingPageState extends State<LandingPage> {
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), //textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0 title: currentTab != 0
? Text(getText(currentTab).toUpperCase()) ? AppText(
getText(currentTab),
letterSpacing: -1.44,
fontWeight: FontWeight.w700,
fontSize: 24.0,
color: Color(0xff2B353E),
)
: SizedBox(), : SizedBox(),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
@ -49,7 +56,7 @@ class _LandingPageState extends State<LandingPage> {
icon: Image.asset('assets/images/menu.png', icon: Image.asset('assets/images/menu.png',
height: 50, width: 50), height: 50, width: 50),
iconSize: 15, iconSize: 15,
color: Colors.black, color: Color(0xff2B353E),
onPressed: () => Scaffold.of(context).openDrawer(), onPressed: () => Scaffold.of(context).openDrawer(),
); );
}, },

@ -12,7 +12,6 @@ import '../../../../routes.dart';
class MyReferralPatientScreen extends StatelessWidget { class MyReferralPatientScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PatientReferralViewModel>( return BaseView<PatientReferralViewModel>(
onModelReady: (model) => model.getPendingReferralPatients(), onModelReady: (model) => model.getPendingReferralPatients(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(

@ -1,6 +1,7 @@
import 'dart:ui'; import 'dart:ui';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.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';
@ -17,10 +18,10 @@ class PatientReferralScreen extends StatefulWidget {
_PatientReferralScreen createState() => _PatientReferralScreen(); _PatientReferralScreen createState() => _PatientReferralScreen();
} }
class _PatientReferralScreen extends State<PatientReferralScreen> with SingleTickerProviderStateMixin { class _PatientReferralScreen extends State<PatientReferralScreen>
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
int index=0; int index = 0;
@override @override
void initState() { void initState() {
@ -41,143 +42,126 @@ class _PatientReferralScreen extends State<PatientReferralScreen> with SingleTic
_tabController.dispose(); _tabController.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, appBar: PatientSearchHeader(
appBarTitle: TranslationBase.of(context).patientsreferral, title: TranslationBase.of(context).patientsreferral,
body: Scaffold( ),
extendBodyBehindAppBar: true, body: Column(
// backgroundColor: Colors.white, children: <Widget>[
appBar: PreferredSize( Container(
preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070), //height: MediaQuery.of(context).size.height * 0.050,
child: Center( decoration: BoxDecoration(
child: Container( border: Border(
height: MediaQuery.of(context).size.height * 0.070, bottom: BorderSide(
decoration: BoxDecoration( color: Theme.of(context).dividerColor,
border: Border( width: 1), //width: 0.7
bottom: BorderSide( ),
color: Theme.of(context).dividerColor, color: Colors.white),
width: 1), //width: 0.7 child: TabBar(
), isScrollable: false,
color: Colors.white), controller: _tabController,
child: Center( indicatorColor: Colors.transparent,
child: TabBar( indicatorWeight: 1.0,
isScrollable: false, indicatorSize: TabBarIndicatorSize.tab,
controller: _tabController, labelColor: Theme.of(context).primaryColor,
indicatorColor: Colors.transparent, labelPadding:
indicatorWeight: 1.0, EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0),
indicatorSize: TabBarIndicatorSize.tab, unselectedLabelColor: Colors.grey[800],
tabs: [
labelColor: Theme.of(context).primaryColor, Container(
labelPadding: EdgeInsets.only(top: 0, left:0, right: 0,bottom: 0), width: MediaQuery.of(context).size.width * 0.33,
unselectedLabelColor: Colors.grey[800], height: MediaQuery.of(context).size.height * 0.070,
tabs: [ decoration: TextFieldsUtils.containerBorderDecoration(
Container( Color(0Xffffffff), Color(0xFFCCCCCC),
width: MediaQuery.of(context).size.width * 0.33, borderRadius: 4, borderWidth: 0),
height: MediaQuery.of(context).size.height * 0.070, child: Center(
decoration: TextFieldsUtils.containerBorderDecoration( child: Container(
Color(0Xffffffff), Color(0xFFCCCCCC), height: MediaQuery.of(context).size.height * 0.070,
borderRadius: 4, borderWidth: 0), decoration: TextFieldsUtils.containerBorderDecoration(
child: Center( index == 0 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
child: Container( index == 0 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
height: MediaQuery.of(context).size.height * 0.070, borderRadius: 4,
decoration: TextFieldsUtils.containerBorderDecoration( borderWidth: 0),
index == 0 child: Center(
? Color(0xFFD02127 ) child: AppText(
: Color(0xFFEAEAEA), TranslationBase.of(context).myReferredPatient,
index == 0 ? Color(0xFFD02127) : Color(0xFFEAEAEA), fontSize: SizeConfig.textMultiplier * 1.8,
borderRadius: 4, color: index == 0 ? Colors.white : Color(0xFF2B353E),
borderWidth: 0), fontWeight: FontWeight.w700,
child: Center(
child: AppText(
TranslationBase.of(context).myReferredPatient,
fontSize: SizeConfig.textMultiplier * 1.8,
color: index == 0 ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
),
),
), ),
), ),
Container( ),
width: MediaQuery.of(context).size.width * 0.34, ),
height: MediaQuery.of(context).size.height * 0.070, ),
decoration: TextFieldsUtils.containerBorderDecoration( Container(
Color(0Xffffffff), Color(0xFFCCCCCC), width: MediaQuery.of(context).size.width * 0.34,
borderRadius: 4, borderWidth: 0), height: MediaQuery.of(context).size.height * 0.070,
child: Center( decoration: TextFieldsUtils.containerBorderDecoration(
child: Container( Color(0Xffffffff), Color(0xFFCCCCCC),
height: MediaQuery.of(context).size.height * 0.070, borderRadius: 4, borderWidth: 0),
decoration: TextFieldsUtils.containerBorderDecoration( child: Center(
index == 1 child: Container(
? Color(0xFFD02127 ) height: MediaQuery.of(context).size.height * 0.070,
: Color(0xFFEAEAEA), decoration: TextFieldsUtils.containerBorderDecoration(
index == 1 ? Color(0xFFD02127) : Color(0xFFEAEAEA), index == 1 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4, index == 1 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderWidth: 0), borderRadius: 4,
child: Center( borderWidth: 0),
child: AppText( child: Center(
TranslationBase.of(context).referral, child: AppText(
fontSize: SizeConfig.textMultiplier * 1.8, TranslationBase.of(context).referral,
color: index == 1 ? Colors.white : Color(0xFF2B353E), fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, color: index == 1 ? Colors.white : Color(0xFF2B353E),
), fontWeight: FontWeight.w700,
),
),
), ),
), ),
Container( ),
width: MediaQuery.of(context).size.width * 0.33, ),
height: MediaQuery.of(context).size.height * 0.070, ),
decoration: TextFieldsUtils.containerBorderDecoration( Container(
Color(0Xffffffff), Color(0xFFCCCCCC), width: MediaQuery.of(context).size.width * 0.33,
borderRadius: 4, borderWidth: 0), height: MediaQuery.of(context).size.height * 0.070,
child: Center( decoration: TextFieldsUtils.containerBorderDecoration(
child: Container( Color(0Xffffffff), Color(0xFFCCCCCC),
height: MediaQuery.of(context).size.height * 0.070, borderRadius: 4, borderWidth: 0),
decoration: TextFieldsUtils.containerBorderDecoration( child: Center(
index == 2 child: Container(
? Color(0xFFD02127 ) height: MediaQuery.of(context).size.height * 0.070,
: Color(0xFFEAEAEA), decoration: TextFieldsUtils.containerBorderDecoration(
index == 2 ? Color(0xFFD02127) : Color(0xFFEAEAEA), index == 2 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4, index == 2 ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderWidth: 0), borderRadius: 4,
child: Center( borderWidth: 0),
child: AppText( child: Center(
TranslationBase.of(context).discharged, child: AppText(
fontSize: SizeConfig.textMultiplier * 1.8, TranslationBase.of(context).discharged,
color: index == 2 ? Colors.white : Color(0xFF2B353E), fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700, color: index == 2 ? Colors.white : Color(0xFF2B353E),
), fontWeight: FontWeight.w700,
),
),
), ),
), ),
),
],
), ),
), ),
), ],
), ),
), ),
body: Column( Expanded(
children: <Widget>[ child: TabBarView(
Expanded( physics: BouncingScrollPhysics(),
child: TabBarView( controller: _tabController,
physics: BouncingScrollPhysics(), children: <Widget>[
controller: _tabController, ReferredPatientScreen(),
children: <Widget>[ MyReferralInPatientScreen(),
ReferredPatientScreen(), ReferralDischargedPatientPage()
MyReferralInPatientScreen(), // MyReferredPatient(),
ReferralDischargedPatientPage() ],
// MyReferredPatient(), ),
], )
), ],
) ),
], );
),
));
} }
} }

@ -23,7 +23,8 @@ import 'package:hexcolor/hexcolor.dart';
class PatientMakeReferralScreen extends StatefulWidget { class PatientMakeReferralScreen extends StatefulWidget {
// previous design page is: ReferPatientScreen // previous design page is: ReferPatientScreen
@override @override
_PatientMakeReferralScreenState createState() => _PatientMakeReferralScreenState(); _PatientMakeReferralScreenState createState() =>
_PatientMakeReferralScreenState();
} }
class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> { class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
@ -56,8 +57,14 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
referToList = List(); referToList = List();
dynamic sameBranch = {"id": 1, "name": TranslationBase.of(context).sameBranch}; dynamic sameBranch = {
dynamic otherBranch = {"id": 2, "name": TranslationBase.of(context).otherBranch}; "id": 1,
"name": TranslationBase.of(context).sameBranch
};
dynamic otherBranch = {
"id": 2,
"name": TranslationBase.of(context).otherBranch
};
referToList.add(sameBranch); referToList.add(sameBranch);
referToList.add(otherBranch); referToList.add(otherBranch);
@ -103,25 +110,57 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
model.patientReferral.length == 0 model.patientReferral.length == 0
? referralForm(model, screenSize) ? referralForm(model, screenSize)
: PatientReferralItemWidget( : PatientReferralItemWidget(
referralStatus: model.patientReferral[model.patientReferral.length - 1].referralStatus, referralStatus: model
patientName: model.patientReferral[model.patientReferral.length - 1].patientName, .patientReferral[
patientGender: model.patientReferral.length - 1]
model.patientReferral[model.patientReferral.length - 1].patientDetails.gender, .referralStatus,
referredDate: patientName: model
model.patientReferral[model.patientReferral.length - 1].referredOn.split(" ")[0], .patientReferral[
referredTime: model.patientReferral.length - 1]
model.patientReferral[model.patientReferral.length - 1].referredOn.split(" ")[1], .patientName,
patientID: "${model.patientReferral[model.patientReferral.length - 1].patientID}", patientGender: model
isSameBranch: .patientReferral[
model.patientReferral[model.patientReferral.length - 1].isReferralDoctorSameBranch, model.patientReferral.length - 1]
.patientDetails
.gender,
referredDate: model
.patientReferral[
model.patientReferral.length - 1]
.referredOn
.split(" ")[0],
referredTime: model
.patientReferral[
model.patientReferral.length - 1]
.referredOn
.split(" ")[1],
patientID:
"${model.patientReferral[model.patientReferral.length - 1].patientID}",
isSameBranch: model
.patientReferral[
model.patientReferral.length - 1]
.isReferralDoctorSameBranch,
isReferral: true, isReferral: true,
remark: model.patientReferral[model.patientReferral.length - 1].remarksFromSource, remark: model
nationality: .patientReferral[
model.patientReferral[model.patientReferral.length - 1].patientDetails.nationalityName, model.patientReferral.length - 1]
nationalityFlag: model.patientReferral[model.patientReferral.length - 1].nationalityFlagUrl, .remarksFromSource,
doctorAvatar: model.patientReferral[model.patientReferral.length - 1].doctorImageUrl, nationality: model
referralDoctorName: .patientReferral[
model.patientReferral[model.patientReferral.length - 1].referredByDoctorInfo, model.patientReferral.length - 1]
.patientDetails
.nationalityName,
nationalityFlag: model
.patientReferral[
model.patientReferral.length - 1]
.nationalityFlagUrl,
doctorAvatar: model
.patientReferral[
model.patientReferral.length - 1]
.doctorImageUrl,
referralDoctorName: model
.patientReferral[
model.patientReferral.length - 1]
.referredByDoctorInfo,
clinicDescription: null, clinicDescription: null,
), ),
], ],
@ -140,22 +179,26 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
eventAction: "Submit Refer", eventAction: "Submit Refer",
); );
if (_referTo == null) { if (_referTo == null) {
branchError = TranslationBase.of(context).fieldRequired; branchError =
TranslationBase.of(context).fieldRequired;
} else { } else {
branchError = null; branchError = null;
} }
if (_selectedBranch == null) { if (_selectedBranch == null) {
hospitalError = TranslationBase.of(context).fieldRequired; hospitalError =
TranslationBase.of(context).fieldRequired;
} else { } else {
hospitalError = null; hospitalError = null;
} }
if (_selectedClinic == null) { if (_selectedClinic == null) {
clinicError = TranslationBase.of(context).fieldRequired; clinicError =
TranslationBase.of(context).fieldRequired;
} else { } else {
clinicError = null; clinicError = null;
} }
if (_selectedDoctor == null) { if (_selectedDoctor == null) {
doctorError = TranslationBase.of(context).fieldRequired; doctorError =
TranslationBase.of(context).fieldRequired;
} else { } else {
doctorError = null; doctorError = null;
} }
@ -166,10 +209,16 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
_selectedDoctor == null || _selectedDoctor == null ||
_remarksController.text == null) return; _remarksController.text == null) return;
model model
.makeReferral(patient, appointmentDate.toIso8601String(), _selectedBranch['facilityId'], .makeReferral(
_selectedClinic['ClinicID'], _selectedDoctor['DoctorID'], _remarksController.text) patient,
appointmentDate.toIso8601String(),
_selectedBranch['facilityId'],
_selectedClinic['ClinicID'],
_selectedDoctor['DoctorID'],
_remarksController.text)
.then((_) { .then((_) {
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsg); DrAppToastMsg.showSuccesToast(
TranslationBase.of(context).referralSuccessMsg);
Navigator.pop(context); Navigator.pop(context);
}); });
}, },
@ -215,7 +264,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model await model
.getClinics(_selectedBranch['facilityId']) .getClinics(_selectedBranch['facilityId'])
.then((_) => GifLoaderDialogUtils.hideDialog(context)); .then((_) =>
GifLoaderDialogUtils.hideDialog(context));
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} }
@ -242,42 +292,47 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).hospital, hintText: TranslationBase.of(context).hospital,
dropDownText: _selectedBranch != null ? _selectedBranch['facilityName'] : null, dropDownText: _selectedBranch != null
? _selectedBranch['facilityName']
: null,
enabled: false, enabled: false,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: hospitalError, validationError: hospitalError,
onClick: onClick: model.branchesList != null &&
model.branchesList != null && model.branchesList.length > 0 && _referTo != null && _referTo['id'] == 2 model.branchesList.length > 0 &&
? () { _referTo != null &&
ListSelectDialog dialog = ListSelectDialog( _referTo['id'] == 2
list: model.branchesList, ? () {
attributeName: 'facilityName', ListSelectDialog dialog = ListSelectDialog(
attributeValueId: 'facilityId', list: model.branchesList,
okText: TranslationBase.of(context).ok, attributeName: 'facilityName',
okFunction: (selectedValue) { attributeValueId: 'facilityId',
setState(() async { okText: TranslationBase.of(context).ok,
_selectedBranch = selectedValue; okFunction: (selectedValue) {
_selectedClinic = null; setState(() async {
_selectedDoctor = null; _selectedBranch = selectedValue;
GifLoaderDialogUtils.showMyDialog(context); _selectedClinic = null;
await model _selectedDoctor = null;
.getClinics(_selectedBranch['facilityId']) GifLoaderDialogUtils.showMyDialog(context);
.then((_) => GifLoaderDialogUtils.hideDialog(context)); await model
if (model.state == ViewState.ErrorLocal) { .getClinics(_selectedBranch['facilityId'])
DrAppToastMsg.showErrorToast(model.error); .then((_) =>
} GifLoaderDialogUtils.hideDialog(context));
}); if (model.state == ViewState.ErrorLocal) {
}, DrAppToastMsg.showErrorToast(model.error);
); }
showDialog( });
barrierDismissible: false, },
context: context, );
builder: (BuildContext context) { showDialog(
return dialog; barrierDismissible: false,
}, context: context,
); builder: (BuildContext context) {
} return dialog;
: null, },
);
}
: null,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
@ -285,11 +340,15 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).clinic, hintText: TranslationBase.of(context).clinic,
dropDownText: _selectedClinic != null ? _selectedClinic['ClinicDescription'] : null, dropDownText: _selectedClinic != null
? _selectedClinic['ClinicDescription']
: null,
enabled: false, enabled: false,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: clinicError, validationError: clinicError,
onClick: _selectedBranch != null && model.clinicsList != null && model.clinicsList.length > 0 onClick: _selectedBranch != null &&
model.clinicsList != null &&
model.clinicsList.length > 0
? () { ? () {
ListSelectDialog dialog = ListSelectDialog( ListSelectDialog dialog = ListSelectDialog(
list: model.clinicsList, list: model.clinicsList,
@ -304,8 +363,12 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
_selectedClinic = selectedValue; _selectedClinic = selectedValue;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model await model
.getClinicDoctors(patient, _selectedClinic['ClinicID'], _selectedBranch['facilityId']) .getClinicDoctors(
.then((_) => GifLoaderDialogUtils.hideDialog(context)); patient,
_selectedClinic['ClinicID'],
_selectedBranch['facilityId'])
.then((_) =>
GifLoaderDialogUtils.hideDialog(context));
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} }
@ -328,11 +391,14 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).doctor, hintText: TranslationBase.of(context).doctor,
dropDownText: _selectedDoctor != null ? _selectedDoctor['Name'] : null, dropDownText:
_selectedDoctor != null ? _selectedDoctor['Name'] : null,
enabled: false, enabled: false,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: doctorError, validationError: doctorError,
onClick: _selectedClinic != null && model.doctorsList != null && model.doctorsList.length > 0 onClick: _selectedClinic != null &&
model.doctorsList != null &&
model.doctorsList.length > 0
? () { ? () {
ListSelectDialog dialog = ListSelectDialog( ListSelectDialog dialog = ListSelectDialog(
list: model.doctorsList, list: model.doctorsList,
@ -357,9 +423,12 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
} }
: () { : () {
if (_selectedClinic == null) { if (_selectedClinic == null) {
DrAppToastMsg.showErrorToast("You need to select a clinic first"); DrAppToastMsg.showErrorToast(
} else if (model.doctorsList == null || model.doctorsList.length == 0) { "You need to select a clinic first");
DrAppToastMsg.showErrorToast("There is no doctors for this clinic"); } else if (model.doctorsList == null ||
model.doctorsList.length == 0) {
DrAppToastMsg.showErrorToast(
"There is no doctors for this clinic");
} }
}, },
), ),
@ -369,8 +438,9 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).date, hintText: TranslationBase.of(context).date,
dropDownText: dropDownText: appointmentDate != null
appointmentDate != null ? "${AppDateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" : null, ? "${AppDateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}"
: null,
enabled: false, enabled: false,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
suffixIcon: IconButton( suffixIcon: IconButton(

@ -269,7 +269,7 @@ class PatientReferralItemWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
referralDoctorName, referralDoctorName ?? "",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14.0, fontSize: 14.0,

Loading…
Cancel
Save