|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/app_state.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/dependencies.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/route_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart';
|
|
|
|
|
@ -11,6 +12,7 @@ import 'package:hmg_patient_app_new/presentation/symptoms_checker/user_info_sele
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/routes/app_routes.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/bottom_navigation/bottom_navigation.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
|
|
|
|
|
|
|
|
|
class LandingNavigation extends StatefulWidget {
|
|
|
|
|
const LandingNavigation({super.key});
|
|
|
|
|
@ -35,7 +37,8 @@ class _LandingNavigationState extends State<LandingNavigation> {
|
|
|
|
|
appState.isAuthenticated ? MedicalFilePage() : /* need add feedback page */ FeedbackPage(),
|
|
|
|
|
SizedBox(),
|
|
|
|
|
// const ToDoPage(),
|
|
|
|
|
const UserInfoSelectionScreen(),
|
|
|
|
|
// appState.isAuthenticated ? UserInfoSelectionScreen() : /* need add news page */ SizedBox(),
|
|
|
|
|
SizedBox(),
|
|
|
|
|
ServicesPage(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -48,6 +51,20 @@ class _LandingNavigationState extends State<LandingNavigation> {
|
|
|
|
|
context.navigateWithName(AppRoutes.bookAppointmentPage);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (_currentIndex == 3) {
|
|
|
|
|
if (appState.isAuthenticated) {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: UserInfoSelectionScreen(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
Utils.openWebView(
|
|
|
|
|
url: 'https://x.com/HMG',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
_pageController.animateToPage(index, duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|