voice command

fix_authentication
Sultan Khan 6 years ago
parent f03a711dff
commit 23b48485ed

@ -66,7 +66,8 @@ class DoctorsListService extends BaseService {
// "Latitude": 0, // "Latitude": 0,
// "Longitude": 0, // "Longitude": 0,
// "License": true, // "License": true,
"IsVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false, "SearchForVoiceCommand":
doctorId != null && doctorId.length > 0 ? true : false,
"DoctorIDsList": doctorId, "DoctorIDsList": doctorId,
"Latitude": lat != null ? lat.toString() : 0, "Latitude": lat != null ? lat.toString() : 0,
"Longitude": long != null ? long.toString() : 0, "Longitude": long != null ? long.toString() : 0,
@ -212,8 +213,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getDoctorScheduledFreeSlots( Future<Map> getDoctorScheduledFreeSlots(int docID, int clinicID,
int docID, int clinicID, int projectID, int serviceID, BuildContext context) async { int projectID, int serviceID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getString(APP_LANGUAGE); var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
@ -241,10 +242,10 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS, await baseAppClient.post(GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
@ -301,8 +302,14 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> insertLiveCareScheduleAppointment(int docID, int clinicID, int projectID, int serviceID, Future<Map> insertLiveCareScheduleAppointment(
String selectedTime, String selectedDate, BuildContext context) async { int docID,
int clinicID,
int projectID,
int serviceID,
String selectedTime,
String selectedDate,
BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -348,10 +355,10 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(INSERT_LIVECARE_SCHEDULE_APPOINTMENT, await baseAppClient.post(INSERT_LIVECARE_SCHEDULE_APPOINTMENT,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
@ -437,10 +444,10 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(GET_PATIENT_SHARE_LIVECARE, await baseAppClient.post(GET_PATIENT_SHARE_LIVECARE,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
localRes = response['OnlineCheckInAppointments'][0]; localRes = response['OnlineCheckInAppointments'][0];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
@ -519,8 +526,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> confirmAppointment( Future<Map> confirmAppointment(int appoNo, int clinicID, int projectID,
int appoNo, int clinicID, int projectID, bool isLiveCare, BuildContext context) async { bool isLiveCare, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -564,9 +571,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> insertVIDARequest(int appoNo, int clinicID, int projectID,
Future<Map> insertVIDARequest( int serviceID, int docID, BuildContext context) async {
int appoNo, int clinicID, int projectID, int serviceID, int docID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -613,10 +619,10 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(INSERT_VIDA_REQUEST, await baseAppClient.post(INSERT_VIDA_REQUEST,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }

@ -50,7 +50,8 @@ class AppScaffold extends StatelessWidget {
this.floatingActionButton, this.floatingActionButton,
this.title, this.title,
this.description, this.description,
this.isShowDecPage = true, this.isBottomBar}); this.isShowDecPage = true,
this.isBottomBar});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -68,7 +69,8 @@ class AppScaffold extends StatelessWidget {
), ),
title: Text(authenticatedUserObject.isLogin title: Text(authenticatedUserObject.isLogin
? appBarTitle.toUpperCase() ? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle),leading: Builder( : TranslationBase.of(context).serviceInformationTitle),
leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return ArrowBack(); return ArrowBack();
}, },
@ -79,7 +81,10 @@ class AppScaffold extends StatelessWidget {
icon: Icon(FontAwesomeIcons.home), icon: Icon(FontAwesomeIcons.home),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false); Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> r) => false);
}, },
), ),
], ],
@ -90,14 +95,14 @@ class AppScaffold extends StatelessWidget {
title: appBarTitle, title: appBarTitle,
description: description, description: description,
) )
:baseViewModel != null : baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(
child: buildBodyWidget(), child: buildBodyWidget(),
baseViewModel: baseViewModel, baseViewModel: baseViewModel,
) )
: buildBodyWidget(), : buildBodyWidget(),
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
floatingActionButton: floatingActionButton ?? floatingActionButton, //floatingActionButton: floatingActionButton ?? floatingActionButton,
// bottomNavigationBar: // bottomNavigationBar:
// this.isBottomBar == true ? BottomBarSearch() : SizedBox() // this.isBottomBar == true ? BottomBarSearch() : SizedBox()
// floatingActionButton: FloatingSearchButton(), // floatingActionButton: FloatingSearchButton(),

Loading…
Cancel
Save