|
|
|
|
@ -52,7 +52,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
ProjectViewModel projectProvider;
|
|
|
|
|
|
|
|
|
|
///inject the user data
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject =
|
|
|
|
|
locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
|
|
|
|
|
final authService = new AuthProvider();
|
|
|
|
|
@ -134,21 +135,21 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
});
|
|
|
|
|
_requestIOSPermissions();
|
|
|
|
|
pageController = PageController(keepPage: true);
|
|
|
|
|
// _firebaseMessaging.setAutoInitEnabled(true);
|
|
|
|
|
//
|
|
|
|
|
// if (Platform.isIOS) {
|
|
|
|
|
// _firebaseMessaging.requestNotificationPermissions();
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// _firebaseMessaging.getToken().then((String token) {
|
|
|
|
|
// sharedPref.setString(PUSH_TOKEN, token);
|
|
|
|
|
// if (token != null) {
|
|
|
|
|
// checkUserStatus(token);
|
|
|
|
|
// }
|
|
|
|
|
// requestPermissions();
|
|
|
|
|
// }).catchError((err) {
|
|
|
|
|
// print(err);
|
|
|
|
|
// });
|
|
|
|
|
_firebaseMessaging.setAutoInitEnabled(true);
|
|
|
|
|
|
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
|
_firebaseMessaging.requestNotificationPermissions();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_firebaseMessaging.getToken().then((String token) {
|
|
|
|
|
sharedPref.setString(PUSH_TOKEN, token);
|
|
|
|
|
if (token != null) {
|
|
|
|
|
checkUserStatus(token);
|
|
|
|
|
}
|
|
|
|
|
requestPermissions();
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//_firebase Background message handler
|
|
|
|
|
// _firebaseMessaging.configure(
|
|
|
|
|
@ -345,7 +346,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
headline6:
|
|
|
|
|
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
|
title: Texts(getText(currentTab).toUpperCase(),bold: true,color: Colors.white,),
|
|
|
|
|
title: Texts(
|
|
|
|
|
getText(currentTab).toUpperCase(),
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
leading: Builder(
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return IconButton(
|
|
|
|
|
@ -373,7 +378,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
controller: pageController,
|
|
|
|
|
children: [
|
|
|
|
|
HomePage(goToMyProfile: () {_changeCurrentTab(1);},),
|
|
|
|
|
HomePage(
|
|
|
|
|
goToMyProfile: () {
|
|
|
|
|
_changeCurrentTab(1);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
MedicalProfilePage(),
|
|
|
|
|
BookingOptions(),
|
|
|
|
|
Container(),
|
|
|
|
|
|