Location Consent Dialog
Component Detail
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.
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
Location Consent Dialog is a modal widget shown via show(BuildContext context) returning a Future
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()