merge-update-with-lab-changes
Sultan Khan 5 years ago
parent 1974e51602
commit 3247378c02

@ -361,5 +361,6 @@ const Map<String, Map<String, String>> localizedValues = {
},
"medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'},
"consultation": {"en": "Consultation", "ar": "استشارة"},
"logs": {"en": "Logs", "ar": "السجلات"}
"logs": {"en": "Logs", "ar": "السجلات"},
"textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"}
};

@ -31,7 +31,7 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] : SETUP_ID

@ -45,7 +45,7 @@ class DoctorsListService extends BaseService {
"SessionID": "YckwoXhUmWBsnHKEKig",
"ClinicID": clinicID,
"ProjectID": projectID,
"DoctorID": doctorId, //!= null ? doctorId : 0,
"DoctorName": doctorId, //!= null ? doctorId : 0,
"ContinueDentalPlan": false,
"IsSearchAppointmnetByClinicID": true,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,

@ -447,6 +447,8 @@ class TranslationBase {
String get consultation =>
localizedValues['consultation'][locale.languageCode];
String get logs => localizedValues['logs'][locale.languageCode];
String get textToSpeech =>
localizedValues['textToSpeech'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -31,6 +31,7 @@ import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'dart:math';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class BottomBarSearch extends StatefulWidget {
@override
@ -83,7 +84,7 @@ class _SearchBot extends State<BottomBarSearch> {
maxLines: null,
controller: searchController,
decoration: InputDecoration(
hintText: 'How May I Help You?',
hintText: TranslationBase.of(context).textToSpeech,
suffixIcon: IconButton(
icon: Icon(Icons.mic),
onPressed: () async {
@ -210,6 +211,7 @@ class _SearchBot extends State<BottomBarSearch> {
result['ClinicId'],
context,
doctorId: result['DoctorId'],
doctorName: result['DoctorName'],
);
} else if (result['ProjectId'] != 0 &&
result['ClinicId'] != 0 &&
@ -234,6 +236,8 @@ class _SearchBot extends State<BottomBarSearch> {
result['ProjectId'],
result['ClinicId'],
context,
doctorId: result['DoctorId'],
doctorName: result['DoctorName'],
);
} else {
Navigator.push(
@ -298,14 +302,17 @@ class _SearchBot extends State<BottomBarSearch> {
isAppo: true);
//speak();
}
});
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
getDoctorsList(projectId, clinicId, context, {doctorId}) {
getDoctorsList(projectId, clinicId, context, {doctorId, doctorName}) {
List<DoctorList> doctorsList = [];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(clinicId, projectId, context, doctorId: doctorId)
.getDoctorsList(clinicId, projectId, context, doctorId: doctorName)
.then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
@ -314,12 +321,13 @@ class _SearchBot extends State<BottomBarSearch> {
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
if (doctorId == null) {
navigateToSearchResults(context, doctorsList);
//speak();
} else {
if (res['DoctorList'].length == 1 && doctorId != null) {
getDoctorProfile(
projectId, clinicId, doctorId, context, doctorsList);
//speak();
} else {
navigateToSearchResults(context, doctorsList);
}
}
});
@ -328,7 +336,8 @@ class _SearchBot extends State<BottomBarSearch> {
}
}).catchError((err) {
print(err);
});
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
Future navigateToDoctorProfile(context, docObject, docProfile,

Loading…
Cancel
Save