feat(mobile): implement first-launch KVKK privacy consent & location permission gate (#115) - #132
Merged
Conversation
…n permission gate (SDDC-79) - Integrate shared_preferences for persistent onboarding and KVKK consent state tracking - Implement OnboardingRepository with acceptance flag and ISO timestamp logging - Create OnboardingPermissionService encapsulating sequential foreground location, background location, and notification prompts - Implement OnboardingBloc and state machine for permission gate flow and error handling - Build KvkkConsentView, KvkkDisclosureBox, and PermissionRationaleDialog adhering to SOCAR design tokens - Wrap application home in OnboardingGateView to guard login and authentication flows on clean installs - Add unit and widget tests covering repository persistence, BLoC transitions, and checkbox interaction Closes #115 Closes SDDC-79
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Jira / Task Reference
mobile📝 Summary of Changes
Implements a first-launch onboarding gate for the SOCAR Dispatch Flutter application in compliance with Section 5.1, Section 6.2 of the Design Document, and NFR-04 (Security & Compliance):
shared_preferences(^2.3.5) and createdOnboardingRepositoryto persistently trackhas_accepted_kvkkand ISO-8601 acceptance timestamp.OnboardingPermissionServiceto orchestrate sequential system prompts (Permission.locationWhenInUse,Permission.locationAlways, andPermission.notification).OnboardingBloc, events, and states for checking onboarding status, toggling consent agreement, and handling permission denial / permanent denial states.KvkkDisclosureBox: Scrollable disclosure box explaining emergency telemetry and data processing terms for industrial plants.PermissionRationaleDialog: Educational prompt directing users to device settings if permissions are permanently denied.KvkkConsentView: Consent view with interactive checkbox and "Continue & Grant Permissions" CTA button.OnboardingGateView: Top-level route guard directing new installs to KVKK consent and subsequent launches directly toAuthGate.test/features/onboarding/validating persistence, BLoC transitions, and UI interaction.🏷️ Type of Change
🧪 Testing & Verification
Automated Tests
flutter test(13/13 passed)flutter analyze(No issues found)Manual Test Steps
KvkkConsentView.LoginView(or active home view if session exists).AuthGate.📋 Pre-Merge Checklist
In Review.