voice command priv

merge-requests/140/head
Sultan Khan 5 years ago
parent a004610ac3
commit 7f44677242

@ -52,6 +52,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
var notificationCount = ''; var notificationCount = '';
var themeNotifier; var themeNotifier;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
@ -77,6 +78,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
setState(() { setState(() {
currentTab = tab; currentTab = tab;
pageController.jumpToPage(tab); pageController.jumpToPage(tab);
}); });
} }
@ -144,14 +146,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
WidgetsBinding.instance WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); .addPostFrameCallback((_) => locationUtils.getCurrentLocation());
if (Platform.isIOS) { if (Platform.isIOS) {
_firebaseMessaging.requestNotificationPermissions(); _firebaseMessaging.requestNotificationPermissions();
} }
_firebaseMessaging.getToken().then((String token) async { _firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
if (token != null && await sharedPref.getObject(USER_PROFILE) ==null) { if (token != null && await sharedPref.getObject(USER_PROFILE) == null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
checkUserStatus(token); checkUserStatus(token);
} }
@ -430,7 +431,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
children: [ children: [
HomePage( HomePage(
goToMyProfile: () { goToMyProfile: () {
_changeCurrentTab(1); // _changeCurrentTab(1);
}, },
), ),
MedicalProfilePage(), MedicalProfilePage(),
@ -471,7 +472,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return TranslationBase.of(context).bookAppo; return TranslationBase.of(context).bookAppo;
} }
} }
setTheme() async{
setTheme() async {
// //
// defaultTheme = // defaultTheme =
// ThemeData( // ThemeData(
@ -524,8 +526,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
.then((res) => {print(res)}); .then((res) => {print(res)});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
setState(() { setState(() {
notificationCount = value['List_PatientDashboard'] notificationCount = value['List_PatientDashboard'][0]
[0]['UnreadPatientNotificationCount'].toString(); ['UnreadPatientNotificationCount']
.toString();
}) })
}); });
} }
@ -557,6 +560,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_changeCurrentTab(2); _changeCurrentTab(2);
} }
} }
login() async { login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA); var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);

@ -135,7 +135,7 @@ class AppScaffold extends StatelessWidget {
// return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]); // return body; //Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]);
return Stack(children: <Widget>[ return Stack(children: <Widget>[
body, body,
isHelp==true ? RobotIcon() : Container() isHelp==true && Provider.of<ProjectViewModel>(context, listen: false).havePrivilege(77) ? RobotIcon() : Container()
]); ]);
} }
} }

@ -221,6 +221,8 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
reconizedWord = result.recognizedWords; reconizedWord = result.recognizedWords;
event.setValue({"searchText": reconizedWord}); event.setValue({"searchText": reconizedWord});
if (result.finalResult == true) { if (result.finalResult == true) {
RoboSearch.closeAlertDialog(context);
// setState(() { // setState(() {
// setState(() { // setState(() {

Loading…
Cancel
Save