Merge branch 'add_mvvm' into 'master'

Add mvvm

See merge request Cloud_Solution/doctor_app_flutter!170
pull/170/head
Mohammad Aljammal 5 years ago
commit 78694a4c07

@ -4,7 +4,9 @@ const Map<String, Map<String, String>> localizedValues = {
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
'lanEnglish': {'en': 'English', 'ar': 'English'}, 'lanEnglish': {'en': 'English', 'ar': 'English'},
'lanArabic': {'en': 'العربية', 'ar': 'العربية'}, 'lanArabic': {'en': 'العربية', 'ar': 'العربية'},
'doctorReply': {'en': 'Doctor Reply', 'ar': 'رد الطبيب'}, 'theDoctor': {'en': 'Doctor', 'ar': 'الطبيب'},
'reply': {'en': 'Reply', 'ar': 'رد'},
'time': {'en': 'Time', 'ar': 'الوقت'}, 'time': {'en': 'Time', 'ar': 'الوقت'},
'fileNo': {'en': 'File No:', 'ar': 'رقم الملف:'}, 'fileNo': {'en': 'File No:', 'ar': 'رقم الملف:'},
'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'}, 'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'},
@ -30,6 +32,8 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
'outPatients': {'en': 'Out-Patients', 'ar': 'ةالمريض الخارجي'}, 'outPatients': {'en': 'Out-Patients', 'ar': 'ةالمريض الخارجي'},
'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'}, 'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'},
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'},
'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'}, 'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'},
'todayStatistics': {'en': 'Today Statistics', 'ar': 'إحصائيات اليوم'}, 'todayStatistics': {'en': 'Today Statistics', 'ar': 'إحصائيات اليوم'},
'arrived': {'en': 'Arrived', 'ar': 'وصل'}, 'arrived': {'en': 'Arrived', 'ar': 'وصل'},
@ -59,7 +63,8 @@ const Map<String, Map<String, String>> localizedValues = {
'searchMedicineNameHere': {'en': 'Search Medicine ', 'ar': 'ابحث هنا'}, 'searchMedicineNameHere': {'en': 'Search Medicine ', 'ar': 'ابحث هنا'},
'youCanFind': {'en': 'You Can Find ', 'ar': 'تستطيع ان تجد '}, 'youCanFind': {'en': 'You Can Find ', 'ar': 'تستطيع ان تجد '},
'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'}, 'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'},
'qrReader': {'en': 'QR Reader', 'ar': 'قارىء رمز الQR'}, 'qr': {'en': 'QR', 'ar': 'QR'},
'reader': {'en': 'Reader', 'ar': 'قارىء رمز ال'},
'startScanning': {'en': 'Start Scanning', 'ar': 'بدء المسح'}, 'startScanning': {'en': 'Start Scanning', 'ar': 'بدء المسح'},
'scanQrCode': { 'scanQrCode': {
'en': 'scan Qr code to retrieve patient profile', 'en': 'scan Qr code to retrieve patient profile',
@ -232,4 +237,16 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'Add Details Of Patient To search', 'en': 'Add Details Of Patient To search',
'ar': ' أضف تفاصيل المريض للبحث' 'ar': ' أضف تفاصيل المريض للبحث'
}, },
"welcome": {'en': 'Welcome', 'ar': ' أهلا بك'},
'youDoNotHaveAnyItem': {
'en': 'You don\'t have any Items',
'ar': 'لا يوجد اي نتائج'
},
'typeMedicineName': {
'en': 'Type Medicine Name',
'ar': 'اكتب اسم الدواء'
},'moreThan3Letter': {
'en': 'Medicine Name Should Be More Than 3 letter',
'ar': 'يجب أن يكون اسم الدواء أكثر من 3 أحرف'
},
}; };

@ -170,7 +170,7 @@ class VitalSignResModel {
triageCategory = json['TriageCategory']; triageCategory = json['TriageCategory'];
gCScore = json['GCScore']; gCScore = json['GCScore'];
lineItemNo = json['LineItemNo']; lineItemNo = json['LineItemNo'];
vitalSignDate = Helpers.convertStringToDate(json['VitalSignDate']); vitalSignDate = json['VitalSignDate'] !=null? Helpers.convertStringToDate(json['VitalSignDate']): new DateTime.now();
actualTimeTaken = json['ActualTimeTaken']; actualTimeTaken = json['ActualTimeTaken'];
sugarLevel = json['SugarLevel']; sugarLevel = json['SugarLevel'];
fBS = json['FBS']; fBS = json['FBS'];

@ -51,7 +51,7 @@ class MedicineProvider with ChangeNotifier {
resetDefaultValues(); resetDefaultValues();
try { try {
_listRequestModel.itemID = itemId; _listRequestModel.itemID = itemId;
isFinished = true; isFinished = false;
await baseAppClient.post(PHARMACY_LIST_URL, await baseAppClient.post(PHARMACY_LIST_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
pharmaciesList = response['PharmList']; pharmaciesList = response['PharmList'];

@ -56,7 +56,7 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).qrReader, appBarTitle: TranslationBase.of(context).qr+ TranslationBase.of(context).reader,
body: Center( body: Center(
child: Container( child: Container(
margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7), margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7),

@ -100,7 +100,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
"Welcome", TranslationBase
.of(context)
.welcome,
fontSize: SizeConfig.textMultiplier * 1.7, fontSize: SizeConfig.textMultiplier * 1.7,
color: Colors.white, color: Colors.white,
) )
@ -110,15 +112,25 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Dr. ${authProvider.doctorProfile 'Dr. ${authProvider.doctorProfile.doctorName}',
.doctorName}',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
color: Colors.white, color: Colors.white,
) )
], ],
), ),
Row( SizedBox(
height: 4,
),
InkWell(
onTap: () async {
showCupertinoPicker(
decKey: '',
context: context,
actionList: projectsProvider
.doctorClinicsList);
},
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
@ -132,6 +144,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
fontSize: fontSize:
SizeConfig.textMultiplier * 1.7, SizeConfig.textMultiplier * 1.7,
color: Colors.white, color: Colors.white,
textAlign: TextAlign.center,
), ),
alignment: projectsProvider.isArabic alignment: projectsProvider.isArabic
? Alignment.topRight ? Alignment.topRight
@ -145,16 +158,15 @@ class _DashboardScreenState extends State<DashboardScreen> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap: () async {
showCupertinoPicker(
decKey: '',
context: context,
actionList: projectsProvider
.doctorClinicsList);
},
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 5, top: 5, right: 10), left: 5,
top: projectsProvider
.isArabic ? 0 : 5,
right: 10,
bottom: projectsProvider
.isArabic ? 15 : 7),
child: Icon( child: Icon(
DoctorApp.sync_icon, DoctorApp.sync_icon,
@ -166,7 +178,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
], ],
), ),
]) ]),
),
], ],
), ),
Expanded( Expanded(
@ -427,6 +441,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(top: 10),
child: Icon( child: Icon(
DoctorApp.radiology, DoctorApp.radiology,
size: 40, size: 40,
@ -434,6 +449,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
), ),
Container( Container(
margin: EdgeInsets.only(bottom: 10),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
AppText( AppText(
@ -645,11 +662,19 @@ class _DashboardScreenState extends State<DashboardScreen> {
color: Colors.black, color: Colors.black,
), ),
), ),
Column(
children: [
AppText( AppText(
TranslationBase TranslationBase.of(context).searchAbout,
.of(context) color: Colors.black,
.searchPatient, textAlign: TextAlign.center,
),
AppText(
TranslationBase.of(context).patient,
color: Colors.black, color: Colors.black,
textAlign: TextAlign.center,
)
],
) )
], ],
), ),
@ -667,11 +692,23 @@ class _DashboardScreenState extends State<DashboardScreen> {
size: 50, size: 50,
color: Colors.black, color: Colors.black,
), ),
Column(
children: [
AppText(
TranslationBase
.of(context)
.theDoctor,
textAlign: TextAlign.center,
color: Colors.black,
),
AppText( AppText(
TranslationBase TranslationBase
.of(context) .of(context)
.doctorReply, .reply,
textAlign: TextAlign.center,
color: Colors.black, color: Colors.black,
),
],
) )
], ],
), ),
@ -739,12 +776,27 @@ class _DashboardScreenState extends State<DashboardScreen> {
size: 50, size: 50,
color: Colors.black, color: Colors.black,
), ),
Column(
children: [
AppText( AppText(
TranslationBase projectsProvider.isArabic
? TranslationBase.of(context).reader
: TranslationBase.of(context).qr,
color: Colors.black,
textAlign: TextAlign.center,
),
AppText(
projectsProvider.isArabic
? TranslationBase
.of(context) .of(context)
.qrReader, .qr
: TranslationBase
.of(context)
.reader,
color: Colors.black, color: Colors.black,
textAlign: TextAlign.center, textAlign: TextAlign.center,
),
],
) )
], ],
), ),
@ -886,6 +938,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
children: actionList children: actionList
.map((e) => Flexible( .map((e) => Flexible(
child: Container( child: Container(
height: 50,
child: InkWell( child: InkWell(
onTap: () => onTap: () =>
changeClinic(e.clinicID, context), changeClinic(e.clinicID, context),
@ -894,8 +947,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
fontSize: fontSize:
SizeConfig.textMultiplier * SizeConfig.textMultiplier *
1.9, 1.9,
)), )),
), ),
)) ))

@ -1,3 +1,5 @@
import 'dart:math';
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/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';
@ -14,19 +16,19 @@ import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.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';
import '../../util/extenstions.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_recognition_result.dart'; import 'package:speech_to_text/speech_recognition_result.dart';
import 'package:speech_to_text/speech_to_text.dart'; import 'package:speech_to_text/speech_to_text.dart';
import 'dart:math';
import '../../util/extenstions.dart';
DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
class MedicineSearchScreen extends StatefulWidget with DrAppToastMsg { class MedicineSearchScreen extends StatefulWidget with DrAppToastMsg {
MedicineSearchScreen({this.changeLoadingStata}); MedicineSearchScreen({this.changeLoadingStata});
final Function changeLoadingStata; final Function changeLoadingStata;
@override @override
@ -43,6 +45,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
bool _isInit = true; bool _isInit = true;
final SpeechToText speech = SpeechToText(); final SpeechToText speech = SpeechToText();
String lastStatus = ''; String lastStatus = '';
// String lastWords; // String lastWords;
List<LocaleName> _localeNames = []; List<LocaleName> _localeNames = [];
String lastError; String lastError;
@ -50,13 +53,14 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
double minSoundLevel = 50000; double minSoundLevel = 50000;
double maxSoundLevel = -50000; double maxSoundLevel = -50000;
String reconizedWord; String reconizedWord;
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
if (_isInit) { if (_isInit) {
_medicineProvider = Provider.of<MedicineProvider>(context); _medicineProvider = Provider.of<MedicineProvider>(context);
requestPermissions(); // requestPermissions();
initSpeechState(); // initSpeechState();
} }
_isInit = false; _isInit = false;
} }
@ -92,7 +96,8 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
appBarTitle: TranslationBase.of(context).searchMedicine, appBarTitle: TranslationBase.of(context).searchMedicine,
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 0.97, widthFactor: 0.97,
child: ListView( child: SingleChildScrollView(
child: Column(
children: <Widget>[ children: <Widget>[
Column( Column(
children: <Widget>[ children: <Widget>[
@ -121,44 +126,47 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
) )
], ],
), ),
SizedBox(height: 15,), SizedBox(
height: 15,
),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
child: AppTextFormField( child: AppTextFormField(
hintText: TranslationBase.of(context).searchMedicineNameHere, hintText: TranslationBase.of(context)
.searchMedicineNameHere,
controller: myController, controller: myController,
onSaved: (value) {}, onSaved: (value) {},
onFieldSubmitted: (value) { onFieldSubmitted: (value) {
searchMedicine(context); searchMedicine(context);
}, },
textInputAction: TextInputAction.search, textInputAction: TextInputAction.search,
prefix: IconButton( // TODO return it back when it needed
icon: Icon(Icons.mic), // prefix: IconButton(
color: // icon: Icon(Icons.mic),
lastStatus == 'listening' ? Colors.red : Colors.grey, // color:
onPressed: () { // lastStatus == 'listening' ? Colors.red : Colors.grey,
myController.text = ''; // onPressed: () {
setState(() { // myController.text = '';
lastStatus = 'listening'; // setState(() {
}); // lastStatus = 'listening';
// });
startVoiceSearch(); //
}), // startVoiceSearch();
// }),
inputFormatter: ONLY_LETTERS), inputFormatter: ONLY_LETTERS),
), ),
SizedBox(height: 15,), SizedBox(
height: 15,
),
Container( Container(
child: Wrap( child: Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: TranslationBase title: TranslationBase.of(context).search,
.of(context)
.search,
onPressed: () { onPressed: () {
searchMedicine(context); searchMedicine(context);
}, },
@ -167,25 +175,25 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
), ),
), ),
Container( Container(
margin: EdgeInsets.only(left: SizeConfig.heightMultiplier * 2), margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase TranslationBase.of(context).youCanFind +
.of(context)
.youCanFind +
_medicineProvider.pharmacyItemsList.length _medicineProvider.pharmacyItemsList.length
.toString() +" "+ .toString() +
TranslationBase " " +
.of(context) TranslationBase.of(context).itemsInSearch,
.itemsInSearch,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
], ],
), ),
), ),
Container( Container(
height: MediaQuery.of(context).size.height * 0.35,
child: Container(
child: !_medicineProvider.isFinished child: !_medicineProvider.isFinished
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: _medicineProvider.hasError : _medicineProvider.hasError
@ -193,25 +201,29 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
child: Text( child: Text(
_medicineProvider.errorMsg, _medicineProvider.errorMsg,
style: TextStyle( style: TextStyle(
color: Theme.of(context).errorColor), color:
Theme.of(context).errorColor),
), ),
) )
: ListView.builder( : ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: _medicineProvider.pharmacyItemsList == itemCount:
_medicineProvider.pharmacyItemsList ==
null null
? 0 ? 0
: _medicineProvider.pharmacyItemsList.length, : _medicineProvider
itemBuilder: (BuildContext context, int index) { .pharmacyItemsList.length,
itemBuilder:
(BuildContext context, int index) {
return InkWell( return InkWell(
child: MedicineItemWidget( child: MedicineItemWidget(
label: label: _medicineProvider
_medicineProvider.pharmacyItemsList[index] .pharmacyItemsList[index]
["ItemDescription"], ["ItemDescription"],
url: url: _medicineProvider
_medicineProvider.pharmacyItemsList[index] .pharmacyItemsList[index]
["ProductImageBase64"], ["ImageSRCUrl"],
), ),
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -220,11 +232,11 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
builder: (context) => builder: (context) =>
PharmaciesListScreen( PharmaciesListScreen(
itemID: _medicineProvider itemID: _medicineProvider
.pharmacyItemsList[index] .pharmacyItemsList[
["ItemID"], index]["ItemID"],
url: _medicineProvider url: _medicineProvider
.pharmacyItemsList[index] .pharmacyItemsList[
["ProductImageBase64"]), index]["ImageSRCUrl"]),
), ),
); );
}, },
@ -232,12 +244,13 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
}, },
), ),
), ),
),
], ],
), ),
), ),
], ],
), ),
),
)); ));
} }
@ -245,7 +258,13 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
if (myController.text.isNullOrEmpty()) { if (myController.text.isNullOrEmpty()) {
_medicineProvider.clearPharmacyItemsList(); _medicineProvider.clearPharmacyItemsList();
helpers.showErrorToast("Type Medicine Name"); helpers.showErrorToast(TranslationBase.of(context).typeMedicineName) ;
//"Type Medicine Name")
return;
}
if (myController.text.length < 3) {
_medicineProvider.clearPharmacyItemsList();
helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter);
return; return;
} }
_medicineProvider.getMedicineItem(myController.text); _medicineProvider.getMedicineItem(myController.text);

@ -6,15 +6,15 @@ import 'package:doctor_app_flutter/providers/medicine_provider.dart';
import 'package:doctor_app_flutter/providers/project_provider.dart'; import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.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';
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:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
@ -80,8 +80,8 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(7)), Radius.circular(7)),
child: widget.url != null ?Image.memory( child: widget.url != null ?Image.network(
dataFromBase64String(widget.url), widget.url,
height: height:
SizeConfig.imageSizeMultiplier * SizeConfig.imageSizeMultiplier *
21, 21,

@ -7,6 +7,7 @@
*@desc: *@desc:
*/ */
import 'package:doctor_app_flutter/config/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: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/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
@ -14,23 +15,16 @@ import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart'; import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/providers/project_provider.dart'; import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.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/card_with_bgNew_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:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class PatientsScreen extends StatefulWidget { class PatientsScreen extends StatefulWidget {
@override @override
@ -38,12 +32,12 @@ class PatientsScreen extends StatefulWidget {
} }
class _PatientsScreenState extends State<PatientsScreen> { class _PatientsScreenState extends State<PatientsScreen> {
List<dynamic> litems; List<dynamic> lItems;
List parsed; List parsed;
List date; List date;
List unfilterDate; List unFilterDate;
Color sideColor = Colors.black; Color sideColor = Colors.black;
List<PatiantInformtion> responseModelList; List<PatiantInformtion> responseModelList;
@ -60,7 +54,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
bool _isInit = true; bool _isInit = true;
String patientType; String patientType;
String patientTypetitle; String patientTypeTitle;
var _isLoading = false; var _isLoading = false;
bool _isError = true; bool _isError = true;
@ -83,9 +77,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
patientType = routeArgs['selectedType']; patientType = routeArgs['selectedType'];
if (!projectsProvider.isArabic) if (!projectsProvider.isArabic)
patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
else else
patientTypetitle = SERVICES_PATIANT_HEADER_AR[int.parse(patientType)]; patientTypeTitle = SERVICES_PATIANT_HEADER_AR[int.parse(patientType)];
print(patientType); print(patientType);
@ -101,8 +95,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
_isLoading = false; _isLoading = false;
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
int val2 = int.parse(patientType); int val2 = int.parse(patientType);
litems = res[SERVICES_PATIANT2[val2]]; lItems = res[SERVICES_PATIANT2[val2]];
parsed = litems; parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list; responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList2 = responseModelList; responseModelList2 = responseModelList;
_isError = false; _isError = false;
@ -314,12 +308,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context); PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
return AppScaffold( return AppScaffold(
appBarTitle: patientTypetitle, appBarTitle: patientTypeTitle,
body: _isLoading body: _isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: _isError : _isError
? DrAppEmbeddedError(error: error) ? DrAppEmbeddedError(error: error)
: litems == null : lItems == null || lItems.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).youDontHaveAnyPatient) error: TranslationBase.of(context).youDontHaveAnyPatient)
: Container( : Container(
@ -327,7 +321,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
children: <Widget>[ children: <Widget>[
Container( Container(
child: litems == null child: lItems == null
? Column( ? Column(
children: <Widget>[ children: <Widget>[
Container( Container(
@ -373,71 +367,70 @@ class _PatientsScreenState extends State<PatientsScreen> {
height: 10.0, height: 10.0,
), ),
Container( Container(
//===============
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0Xffffffff), color: Color(0Xffffffff),
borderRadius: borderRadius:
BorderRadius.circular(20)), BorderRadius.circular(20)),
//================
margin: margin:
EdgeInsets.fromLTRB(15, 0, 15, 0), EdgeInsets.fromLTRB(15, 0, 15, 0),
child: Column( child: (responseModelList.length > 0)
? Column(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: responseModelList children: responseModelList
.map((PatiantInformtion item) { .map((PatiantInformtion item) {
return Container( return Container(
decoration: myBoxDecoration(), decoration: myBoxDecoration(),
child: InkWell( child: InkWell(
child: CardWithBgWidgetNew(
//CardWithBgWidget(
widget: Column(
children: <Widget>[
Container(
// decoration: myBoxDecoration(),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Column( Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment MainAxisAlignment
.start, .start,
children: < children: <Widget>[
Widget>[
Container( Container(
decoration: decoration:
BoxDecoration( BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment( begin:
Alignment(
-1, -1,
-1), -1),
end: Alignment( end:
1, Alignment(
1), 1, 1),
colors: [ colors: [
Colors.grey[100], Colors.grey[
Colors.grey[200], 100],
Colors.grey[
200],
]), ]),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color.fromRGBO( color: Color
.fromRGBO(
0, 0,
0, 0,
0, 0,
0.08), 0.08),
offset: Offset(0.0, offset:
Offset(
0.0,
5.0), 5.0),
blurRadius: blurRadius:
16.0) 16.0)
], ],
borderRadius: borderRadius: BorderRadius
BorderRadius.all( .all(Radius
Radius.circular(50.0)), .circular(
50.0)),
), ),
width: 80, width: 80,
height: 80, height: 80,
child: Icon( child: Icon(
item.genderDescription == item
.genderDescription ==
"Male" "Male"
? DoctorApp ? DoctorApp
.male .male
@ -450,12 +443,15 @@ class _PatientsScreenState extends State<PatientsScreen> {
SizedBox( SizedBox(
width: 10, width: 10,
), ),
Column( Expanded(
child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: < children: <Widget>[
Widget>[ SizedBox(
height: 15,
),
AppText( AppText(
item.firstName + item.firstName +
" " + " " +
@ -464,17 +460,16 @@ class _PatientsScreenState extends State<PatientsScreen> {
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
fontWeight: fontWeight:
FontWeight FontWeight.bold,
.bold,
backGroundcolor: backGroundcolor:
Colors Colors.white,
.white,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
TranslationBase.of( TranslationBase
.of(
context) context)
.fileNo + .fileNo +
item.patientId item.patientId
@ -483,18 +478,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
fontWeight: fontWeight:
FontWeight FontWeight.bold,
.bold,
backGroundcolor: backGroundcolor:
Colors Colors.white,
.white,
), ),
// SizedBox(
// height: 8,
// ),
AppText( AppText(
TranslationBase.of( TranslationBase
.of(
context) context)
.age + .age +
item.age item.age
@ -503,73 +493,92 @@ class _PatientsScreenState extends State<PatientsScreen> {
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
fontWeight: fontWeight:
FontWeight FontWeight.bold,
.bold,
backGroundcolor: backGroundcolor:
Colors Colors.white,
.white,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
SERVICES_PATIANT2[ SERVICES_PATIANT2[
int.parse(patientType)] == int.parse(
patientType)] ==
"List_MyOutPatient" "List_MyOutPatient"
? Row( ? Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment
.spaceBetween,
children: < children: <
Widget>[ Widget>[
Container( Container(
height: height:
20, 20,
width: width: 80,
80,
decoration: decoration:
BoxDecoration( BoxDecoration(
borderRadius: BorderRadius.circular(50), borderRadius:
color: Hexcolor("#20A169"), BorderRadius
.circular(
50),
color: Hexcolor(
"#20A169"),
), ),
child: child:
AppText( AppText(
item.startTime, item
color: Colors.white, .startTime,
fontSize: 2 * SizeConfig.textMultiplier, color: Colors
textAlign: TextAlign.center, .white,
fontWeight: FontWeight.bold, fontSize:
2 * SizeConfig
.textMultiplier,
textAlign:
TextAlign
.center,
fontWeight:
FontWeight
.bold,
), ),
), ),
SizedBox( SizedBox(
width: width: 60,
60,
), ),
Container( Container(
child: child:
AppText( AppText(
convertDateFormat2(item.appointmentDate.toString()), convertDateFormat2(
fontSize: 2.0 * SizeConfig.textMultiplier, item
fontWeight: FontWeight.bold, .appointmentDate
.toString()),
fontSize:
2.0 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight
.bold,
), ),
) )
], ],
) )
: AppText( : AppText(
item.nationalityName ?? item
item.nationalityNameN, .nationalityName ??
fontSize: item
2.5 * .nationalityNameN,
SizeConfig.textMultiplier, fontSize: 2.5 *
SizeConfig
.textMultiplier,
), ),
], SizedBox(
height: 15,
), ),
// Divider(color: Colors.grey)
], ],
), ),
), ),
// Divider(color: Colors.grey) // Divider(color: Colors.grey)
], ],
), ),
),
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context)
.pushNamed( .pushNamed(
@ -581,6 +590,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
), ),
); );
}).toList(), }).toList(),
)
: Center(
child: DrAppEmbeddedError(
error: TranslationBase
.of(context)
.youDontHaveAnyPatient),
), ),
), ),
], ],
@ -610,9 +625,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
} }
Widget _locationBar(BuildContext _context) { Widget _locationBar(BuildContext _context) {
return Container( return Expanded(
height: MediaQuery.of(context).size.height * 0.065, child: Container(
width: SizeConfig.screenWidth * 0.9, height: MediaQuery
.of(context)
.size
.height * 0.065,
width: SizeConfig.screenWidth * 0.95,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)), color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)),
child: Row( child: Row(
@ -639,9 +658,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
color: _isActive color: _isActive
? Colors.white ? Colors.white
: Colors.black, //Colors.black, : Colors.black, //Colors.black,
// backgroundColor:_isActive
// ? Hexcolor("#B8382B")
// : Colors.white,//sideColor,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -670,6 +686,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
]); ]);
}).toList(), }).toList(),
), ),
),
); );
} }
@ -677,7 +694,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
return BoxDecoration( return BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
// <--- top side
color: Colors.grey, color: Colors.grey,
width: 1.0, width: 1.0,
), ),

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/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:doctor_app_flutter/models/patient/insurance_aprovals_request.dart'; import 'package:doctor_app_flutter/models/patient/insurance_aprovals_request.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -15,7 +16,6 @@ import '../../../util/dr_app_shared_pref.dart';
import '../../../widgets/shared/app_scaffold_widget.dart'; import '../../../widgets/shared/app_scaffold_widget.dart';
import '../../../widgets/shared/app_texts_widget.dart'; import '../../../widgets/shared/app_texts_widget.dart';
import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -85,7 +85,7 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.insuranceApporvalsList == null : patientsProv.insuranceApporvalsList == null || patientsProv.insuranceApporvalsList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: error:
TranslationBase.of(context).errorNoInsuranceApprovals) TranslationBase.of(context).errorNoInsuranceApprovals)
@ -475,6 +475,7 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
} }
convertDateFormat(String str) { convertDateFormat(String str) {
if (str == null) return '';
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";

@ -83,7 +83,7 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: notesList == null : notesList == null || notesList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoOrders) error: TranslationBase.of(context).errorNoOrders)
: Column( : Column(

@ -83,7 +83,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: notesList == null : notesList == null || notesList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote) error: TranslationBase.of(context).errorNoProgressNote)
: Column( : Column(

@ -81,7 +81,7 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.patientRadiologyList.length == 0 : patientsProv.patientRadiologyList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoVitalSign) error: TranslationBase.of(context).youDoNotHaveAnyItem)
: Container( : Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,

File diff suppressed because one or more lines are too long

@ -24,7 +24,8 @@ class TranslationBase {
String get lanArabic => localizedValues['lanArabic'][locale.languageCode]; String get lanArabic => localizedValues['lanArabic'][locale.languageCode];
String get doctorReply => localizedValues['doctorReply'][locale.languageCode]; String get theDoctor => localizedValues['theDoctor'][locale.languageCode];
String get reply => localizedValues['reply'][locale.languageCode];
String get time => localizedValues['time'][locale.languageCode]; String get time => localizedValues['time'][locale.languageCode];
@ -56,6 +57,10 @@ class TranslationBase {
String get outPatients => localizedValues['outPatients'][locale.languageCode]; String get outPatients => localizedValues['outPatients'][locale.languageCode];
String get searchPatient => String get searchPatient =>
localizedValues['searchPatient'][locale.languageCode]; localizedValues['searchPatient'][locale.languageCode];
String get searchAbout =>
localizedValues['searchAbout'][locale.languageCode];
String get patient =>
localizedValues['patient'][locale.languageCode];
String get labResult => localizedValues['labResult'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode];
String get todayStatistics => String get todayStatistics =>
localizedValues['todayStatistics'][locale.languageCode]; localizedValues['todayStatistics'][locale.languageCode];
@ -91,7 +96,8 @@ class TranslationBase {
String get youCanFind => localizedValues['youCanFind'][locale.languageCode]; String get youCanFind => localizedValues['youCanFind'][locale.languageCode];
String get itemsInSearch => String get itemsInSearch =>
localizedValues['itemsInSearch'][locale.languageCode]; localizedValues['itemsInSearch'][locale.languageCode];
String get qrReader => localizedValues['qrReader'][locale.languageCode]; String get qr => localizedValues['qr'][locale.languageCode];
String get reader => localizedValues['reader'][locale.languageCode];
String get startScanning => String get startScanning =>
localizedValues['startScanning'][locale.languageCode]; localizedValues['startScanning'][locale.languageCode];
String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode]; String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode];
@ -182,7 +188,8 @@ class TranslationBase {
localizedValues['pleaseEnterTheCode'][locale.languageCode]; localizedValues['pleaseEnterTheCode'][locale.languageCode];
String get youDontHaveAnyPatient => String get youDontHaveAnyPatient =>
localizedValues['youDon\'tHaveAnyPatient'][locale.languageCode]; localizedValues['youDon\'tHaveAnyPatient'][locale.languageCode];
String get youDoNotHaveAnyItem =>
localizedValues['youDoNotHaveAnyItem'][locale.languageCode];
String get age => localizedValues['age'][locale.languageCode]; String get age => localizedValues['age'][locale.languageCode];
String get today => localizedValues['today'][locale.languageCode]; String get today => localizedValues['today'][locale.languageCode];
String get tomorrow => localizedValues['tomorrow'][locale.languageCode]; String get tomorrow => localizedValues['tomorrow'][locale.languageCode];
@ -262,6 +269,10 @@ class TranslationBase {
String get searchPatientImageCaptionBody => String get searchPatientImageCaptionBody =>
localizedValues['searchPatientImageCaptionBody'][locale.languageCode]; localizedValues['searchPatientImageCaptionBody'][locale.languageCode];
String get welcome => localizedValues['welcome'][locale.languageCode];
String get typeMedicineName => localizedValues['typeMedicineName'][locale.languageCode];
String get moreThan3Letter => localizedValues['moreThan3Letter'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -284,14 +284,13 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
Form( Form(
key: _formKey, key: _formKey,
child: TextFields( child: TextFields(
controller:answerController,
maxLines: 2, maxLines: 2,
minLines: 2, minLines: 2,
hintText: hintText:
TranslationBase.of(context).answerThePatient, TranslationBase.of(context).answerThePatient,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
initialValue: widget.myReferralPatientModel
.referredDoctorRemarks ??
'',
readOnly: _isLoading, readOnly: _isLoading,
validator: (value) { validator: (value) {
if (value.isEmpty) if (value.isEmpty)

@ -164,7 +164,8 @@ class PatientProfileButton extends StatelessWidget {
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 2,
), ),
), ),
Container( Expanded(
child: Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
@ -172,7 +173,8 @@ class PatientProfileButton extends StatelessWidget {
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: new Image.asset(url + icon)) child: new Image.asset(url + icon))
], ],
)) )),
)
]), ]),
), ),
decoration: BoxDecoration( decoration: BoxDecoration(

@ -15,7 +15,7 @@ class AppButton extends StatefulWidget {
final double fontSize; final double fontSize;
final double padding; final double padding;
AppButton({@required this.onPressed, this.title, this.icon, this.color, this.fontSize = 2, this.padding = 5}); AppButton({@required this.onPressed, this.title, this.icon, this.color, this.fontSize = 2, this.padding = 13});
_AppButtonState createState() => _AppButtonState(); _AppButtonState createState() => _AppButtonState();

@ -125,7 +125,7 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).qrReader, DoctorApp.qr_code), TranslationBase.of(context).qr+ TranslationBase.of(context).reader, DoctorApp.qr_code),
onTap: () { onTap: () {
Navigator.pop(context); Navigator.pop(context);
Navigator.of(context).pushNamed(QR_READER); Navigator.of(context).pushNamed(QR_READER);

@ -44,14 +44,14 @@ class _BottomNavBarState extends State<BottomNavBar> {
currentIndex: 0, currentIndex: 0,
name: TranslationBase.of(context).home, name: TranslationBase.of(context).home,
), ),
BottomNavigationItem( // BottomNavigationItem(
icon: DoctorApp.message_icon, // icon: DoctorApp.message_icon,
activeIcon: DoctorApp.message_icon_active, // activeIcon: DoctorApp.message_icon_active,
changeIndex: _changeIndex, // changeIndex: _changeIndex,
index: _index, // index: _index,
currentIndex: 1, // currentIndex: 1,
name: TranslationBase.of(context).replay2, // name: TranslationBase.of(context).replay2,
), // ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.schedule_icon, icon: DoctorApp.schedule_icon,
activeIcon: DoctorApp.scdedule_icon_active, activeIcon: DoctorApp.scdedule_icon_active,
@ -60,14 +60,14 @@ class _BottomNavBarState extends State<BottomNavBar> {
currentIndex: 2, currentIndex: 2,
name: TranslationBase.of(context).mySchedule, name: TranslationBase.of(context).mySchedule,
), ),
BottomNavigationItem( // BottomNavigationItem(
icon: DoctorApp.menu_icon, // icon: DoctorApp.menu_icon,
activeIcon: DoctorApp.menu_icon_active, // activeIcon: DoctorApp.menu_icon_active,
changeIndex: _changeIndex, // changeIndex: _changeIndex,
index: _index, // index: _index,
currentIndex: 3, // currentIndex: 3,
name: TranslationBase.of(context).services, // name: TranslationBase.of(context).services,
) // )
], ],
), ),
), ),

Loading…
Cancel
Save