User Interface low complexity mobile
1
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Modal dialog shown to peer mentors when they are invited to share their location. Explains what data is collected, how it is used, and links to the privacy policy. Records explicit opt-in or opt-out decision and does not collect location data without confirmed consent.

Feature: Geographic Peer Mentor Map View

location-consent-dialog

Summaries

The Location Consent Dialog is the organization's primary legal and ethical safeguard for the mentor location feature. By explicitly presenting what data is collected, how it is used, and linking to the privacy policy before any location data is gathered, the platform ensures full compliance with data privacy regulations including GDPR and CCPA. A consent failure — collecting location without explicit opt-in — carries significant regulatory and reputational risk. This component directly protects the organization from that risk while building mentor trust, which is essential to achieving the participation rates needed for the map feature to deliver value.

Low-complexity UI component with a single dependency on location-consent-service for persisting the consent decision. It must be implemented and approved by the legal or compliance team before the location feature can go live — making it a potential critical-path blocker if not started early. Privacy policy link target must be confirmed with the legal team before implementation. Testing must verify that location data collection is strictly blocked in all code paths until onConsentGranted() is confirmed, including edge cases like app backgrounding mid-dialog.

The async Future return pattern requires integration testing with the calling screen to validate all decision branches.

Location Consent Dialog is a modal widget shown via show(BuildContext context) returning a Future resolved on user action. It calls onConsentGranted() or onConsentDenied() and delegates persistence to location-consent-service. The dialog must be non-dismissible via back-button or tap-outside — use WillPopScope or PopScope to intercept back navigation and force an explicit decision. The privacy policy link (onViewPrivacyPolicy) should open an in-app WebView or external browser without dismissing the dialog.

The consent decision must be persisted by location-consent-service before the Future completes to prevent a race condition where the app proceeds before the record is written. Use the mentor-location-consent data model for the stored record structure.

Responsibilities

  • Present clear explanation of location data usage
  • Capture mentor consent decision (opt-in or opt-out)
  • Link to privacy policy document
  • Prevent location data collection without confirmed consent

Interfaces

show(BuildContext context) → Future<ConsentDecision>
onConsentGranted()
onConsentDenied()
onViewPrivacyPolicy()

Relationships

Dependencies (1)

Components this component depends on