|
|
|
@ -104,9 +104,13 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
|
|
|
|
|
|
|
|
final ScrollController _horizontalScrollController = ScrollController();
|
|
|
|
final ScrollController _horizontalScrollController = ScrollController();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final ScrollController _scrollController = ScrollController();
|
|
|
|
|
|
|
|
double _scrollOpacity = 0.0;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
void dispose() {
|
|
|
|
_horizontalScrollController.dispose();
|
|
|
|
_horizontalScrollController.dispose();
|
|
|
|
|
|
|
|
_scrollController.dispose();
|
|
|
|
super.dispose();
|
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -122,6 +126,17 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
showQuickLogin(context);
|
|
|
|
showQuickLogin(context);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_scrollController.addListener(() {
|
|
|
|
|
|
|
|
final scrollOffset = _scrollController.offset;
|
|
|
|
|
|
|
|
final newOpacity = (scrollOffset / 50).clamp(0.0, 1.0);
|
|
|
|
|
|
|
|
if (_scrollOpacity != newOpacity) {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
_scrollOpacity = newOpacity;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
scheduleMicrotask(() async {
|
|
|
|
scheduleMicrotask(() async {
|
|
|
|
if (!appState.isAuthenticated) {
|
|
|
|
if (!appState.isAuthenticated) {
|
|
|
|
// LoaderBottomSheet.showLoader();
|
|
|
|
// LoaderBottomSheet.showLoader();
|
|
|
|
@ -203,6 +218,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
|
|
|
controller: _scrollController,
|
|
|
|
physics: const AlwaysScrollableScrollPhysics(),
|
|
|
|
physics: const AlwaysScrollableScrollPhysics(),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: (appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
|
|
|
|
top: (appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
|
|
|
|
@ -701,7 +717,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return AnimationConfiguration.staggeredList(
|
|
|
|
return AnimationConfiguration.staggeredList(
|
|
|
|
position: index,
|
|
|
|
position: index,
|
|
|
|
duration: const Duration(milliseconds: 1000),
|
|
|
|
duration: const Duration(milliseconds: 500),
|
|
|
|
child: SlideAnimation(
|
|
|
|
child: SlideAnimation(
|
|
|
|
horizontalOffset: 100.0,
|
|
|
|
horizontalOffset: 100.0,
|
|
|
|
child: FadeInAnimation(
|
|
|
|
child: FadeInAnimation(
|
|
|
|
@ -833,6 +849,25 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
AnimatedOpacity(
|
|
|
|
|
|
|
|
opacity: _scrollOpacity,
|
|
|
|
|
|
|
|
duration: Duration(milliseconds: 200),
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
height: MediaQuery.paddingOf(context).top + 10.h,
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
gradient: LinearGradient(
|
|
|
|
|
|
|
|
begin: Alignment.topCenter,
|
|
|
|
|
|
|
|
end: Alignment.bottomCenter,
|
|
|
|
|
|
|
|
colors: [
|
|
|
|
|
|
|
|
AppColors.scaffoldBgColor,
|
|
|
|
|
|
|
|
AppColors.scaffoldBgColor.withValues(alpha: 0.9),
|
|
|
|
|
|
|
|
AppColors.scaffoldBgColor.withValues(alpha: 0.0),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
stops: [0.0, 0.7, 1.0],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
(appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
|
|
|
|
(appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
|
|
|
|
? Container(
|
|
|
|
? Container(
|
|
|
|
height: MediaQuery.paddingOf(context).top + 50.h,
|
|
|
|
height: MediaQuery.paddingOf(context).top + 50.h,
|
|
|
|
@ -1042,7 +1077,7 @@ class _LandingPageState extends State<LandingPage> {
|
|
|
|
// Queue Card: Currently serving section
|
|
|
|
// Queue Card: Currently serving section
|
|
|
|
Widget _buildServingNowSection() {
|
|
|
|
Widget _buildServingNowSection() {
|
|
|
|
if (myAppointmentsViewModel.patientQueueDetailsList.isEmpty) {
|
|
|
|
if (myAppointmentsViewModel.patientQueueDetailsList.isEmpty) {
|
|
|
|
return SizedBox(height: 12.h);
|
|
|
|
return SizedBox(height: 24.h);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
final servingQueue = myAppointmentsViewModel.patientQueueDetailsList.first;
|
|
|
|
final servingQueue = myAppointmentsViewModel.patientQueueDetailsList.first;
|
|
|
|
|