Skip to content

Commit

Permalink
pageLock
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-lox committed Oct 19, 2024
1 parent 113a170 commit a580146
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/presentation_layer/routes/nostr/onboarding/onboarding.dart
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ class _NostrOnboardingState extends ConsumerState<NostrOnboarding>
keepPage: true,
);
bool horizontalScrollLock = false;
bool pageLock = false;

void _setupTabLiseners() {
// listen to changes of tabs
@@ -37,6 +38,15 @@ class _NostrOnboardingState extends ConsumerState<NostrOnboarding>
horizontalScrollLock = false;
});
}
if (_tabController.index == 4) {
setState(() {
pageLock = true;
});
} else {
setState(() {
pageLock = false;
});
}
});
_horizontalPageController.addListener(() {
if (horizontalScrollLock) {
@@ -80,6 +90,7 @@ class _NostrOnboardingState extends ConsumerState<NostrOnboarding>
const OnboardingLoginPage(),
TabBarView(
controller: _tabController,
physics: pageLock ? const NeverScrollableScrollPhysics() : null,
children: [
OnboardingPage01(
loginCallback: _navigateToLogin,

0 comments on commit a580146

Please sign in to comment.