consent_mode_flutter 1.0.6
consent_mode_flutter: ^1.0.6 copied to clipboard
A comprehensive Flutter library for managing user consent according to GDPR, CCPA, and other privacy regulations.
1.0.6 #
- Fixed the banner closing before
savePreferenceshad written to disk:shouldShowBannerandpreferencescould still report the previous state right after the sheet was dismissed - Fixed the same race in the more information screen: the save and accept-all buttons now wait for
onSavebefore popping, and keep the screen open when saving fails - Fixed a
ConcurrentModificationErrorwhen a listener removed itself from within its own callback, which made a successfulsavePreferencesthrow - A failed save now keeps the sheet open and shows the error, instead of dismissing it as if the consent had been recorded
savePreferences,acceptAllandrejectAllnow throw aStateErrorwhen the storage backend returnsfalseinstead of raising: that return value was being discarded, so a write that never reached the disk was reported as a success (reproducible on Android, where the legacy editor usescommit()).StateErrorextendsError, notException, so callers must use a barecatchto handle it.reset()now throws when removing stored consent returnsfalse, and removesconsent_banner_shownbefore the stored preferences with each result checked immediately. This prevents a partial removal from leaving the banner permanently hidden with no consent recorded.- In-memory manager state is no longer updated before persistence is confirmed: a failed save or reset leaves the previous state intact
- Fixed a double
Navigator.poptriggered by tapping "more information" while a save was in progress, which closed the more information sheet right after opening it - The accept-all button of the more information screen now checks the in-progress guard before mutating the preferences
- Fixed the fully custom UI never closing:
ConsentModeFlutterCustomConfigUiStyleHelpersaved the consent but never popped the bottom sheet, which has back, barrier and drag disabled, leaving the user stuck on the banner (the README "Option 4" snippet had the same defect) - README: documented that the persistence methods must be awaited and can throw, documented the denied-by-default state, completed the "Main APIs" section, and fixed snippets that did not compile (
manager.showBanner(), the "Direct Configuration" block, and the unexportedCustomColors)
1.0.5 #
- Added Swift Package Manager (SPM) support for iOS, alongside the existing CocoaPods setup (dual support, no minimum Flutter SDK bump)
- Moved iOS sources to
ios/consent_mode_flutter/Sources/and addedPackage.swift - Activated the iOS privacy manifest (
PrivacyInfo.xcprivacy) for both SPM and CocoaPods - Fixed iOS method channel name mismatch (
consentmodeflutter→consent_mode_flutter) that prevented native calls from resolving
1.0.4 #
- Fixed bottom sheet content being hidden behind Android navigation bar (gesture nav and 3-button nav)
- Bottom padding now accounts for system navigation bar height via
MediaQuery.of(context).padding.bottom
1.0.3 #
- Added
backgroundColorfield toConsentModeFlutterStandardUIStyle(default:Colors.white, backward-compatible) - Added
alwaysActiveBadgeColorfield toConsentModeFlutterExpandableTileStyle(default:Color(0xFFE0E0E0), backward-compatible) - Banner and more information screen now use
style.backgroundColorinstead of hardcodedColors.white - "Always Active" badge now uses
alwaysActiveBadgeColorinstead of hardcodedColors.grey[200] ConsentModeFlutterUiStyleHelper.bannerStylenow adapts to light/dark theme automatically- Updated
shared_preferencesto ^2.5.5
1.0.0 #
- Initial release
- Complete consent management (Essential, Analytics, Marketing, Functional)
- Customizable UI with banner and bottom sheet
- Fully custom UI with complete control
- Listeners to react to consent changes
- Automatic preference persistence
- Simple integration with analytics and marketing tools
1.0.1 – 2025-06-11 #
- Fix apertura URL privacy policy su Android
- Miglioramenti minori nella documentazione
1.0.2 – 2025-06-13 #
- Moved the launchPrivacyPolicy method to the ConsentModeFlutterUtils class for better reusability
- No changes in behavior or functionality