ad_flow 1.3.11
ad_flow: ^1.3.11 copied to clipboard
Easy AdMob integration for Flutter with banner, interstitial, rewarded, native & app open ads, plus built-in GDPR/ATT consent management and mediation support.
1.3.11 #
- FIX:
AppOpenAdManager.addStatusListenercallback now fires correctly (#3)- Status listeners were not notified when using
showAdIfAvailable() - Now properly calls
_notifyStatusListeners()on show/dismiss/fail events
- Status listeners were not notified when using
- FIX: iOS App Store rejection for GDPR shown after ATT denial (#2)
- Added
skipGdprConsentIfAttDeniedconfig option (default:true) - When user selects "Ask App Not to Track", GDPR consent UI is skipped
- Prevents Apple Guideline 5.1.1 rejections
- Set to
falseif you legally require showing GDPR consent regardless of ATT
- Added
- NEW:
ConsentManager.lastAttStatusandisAttDeniedgetters- Access the iOS ATT authorization status after consent gathering
1.3.10 #
- NEW:
EasyBannerAdnow supports custom ad sizes- Use
EasyBannerAd(adSize: AdSize.mediumRectangle)for fixed-size banners - Supports all standard sizes:
banner,largeBanner,mediumRectangle,leaderboard, etc. - Fixed-size banners skip orientation handling for better performance
- Priority:
adSize>collapsible> adaptive (default)
- Use
1.3.9 #
- FIX: Export
BannerAdListenerfromgoogle_mobile_ads(fixes #1)- Allows users to create custom-sized
BannerAdinstances directly
- Allows users to create custom-sized
- NEW: Added
BannerAdManager.loadBanner()method for custom ad sizes- Load banners with specific sizes like
AdSize.mediumRectangle(300x250) for dialogs - Same consent/disabled checks and callbacks as
loadAdaptiveBanner()
- Load banners with specific sizes like
1.3.8 #
- NEW: Mediation support for third-party ad networks
- Added
MediationHelperclass for forwarding consent to mediation networks - Built-in support for Unity Ads and AppLovin with convenience methods
- Register custom adapters for any mediation network
- Consent auto-forwarded during
initialize()/initializeWithExplainer() - See
doc/MEDIATION_SETUP.mdfor complete integration guide
- Added
- DOCS: Added comprehensive mediation documentation
- IMPROVED: Updated copilot-instructions.md with mediation patterns
1.3.7 #
- FIX:
NativeAdWidgetnow respectsAdsEnabledManager.isDisabledon initial build - IMPROVED: Added comprehensive tests for
EasyNativeAdandNativeAdWidgetads-disabled behavior
1.3.6 #
- NEW:
EasyNativeAdnow collapses when ads fail to load (no more empty white space)- Added
hideOnLoadingparameter (default:true) - collapses while loading - Added
hideOnErrorparameter (default:true) - collapses on load failure (e.g., no fill) - Set to
falseto show loading/error widgets with reserved height
- Added
- FIX: Removed double semicolon in
BannerAdManagercausing static analysis warning - IMPROVED: Better UX for fixed-height layouts like
bottomNavigationBar
1.3.5 #
- FIX: All ad managers now respect
AdsEnabledManager.isDisabledstateloadAd()andshowAd()check disabled state before proceeding- Fixes race condition where
disableAds()inonCompletewas too late - Affected managers:
BannerAdManager,InterstitialAdManager,RewardedAdManager,AppOpenAdManager,NativeAdManager
- DOCS: Updated copilot-instructions.md with timing warning for disabling ads
1.3.4 #
- FIX: Applied
dart formatto all files for pub.flutter-io.cn static analysis compliance
1.3.3 #
- IMPROVED: Code quality improvements across all ad managers
- Extracted magic numbers to named constants for better maintainability
- Added explicit types for improved type safety in
AdFlowConfig - Fixed potential memory leaks in dispose methods (banner, interstitial, app open)
- IMPROVED: Selective ad type preloading
preloadAds()now only preloads ad types that have real IDs configured- Added
hasBannerConfigured,hasInterstitialConfigured, etc. getters - Use only the ad types you need without loading unnecessary ads
- FIX:
reset()now properly callsAdFlowConfig.resetCurrent()- Previously config state persisted after reset, now fully resets
- FIX: Status listeners properly cleaned up in dispose methods
- IMPROVED: Simplified example files
- Replaced complex demo pages with two clean, reactive examples
example_with_explainer.dart- GDPR-friendly with explainer dialogexample_without_explainer.dart- Direct initialization- Both examples demonstrate reactive UI with status listeners
1.3.2 #
- NEW: Centralized error handling with
AdFlowErroranderrorStream- Subscribe to
AdFlow.instance.errorStreamfor all ad-related errors - Use
AdFlow.instance.setErrorCallback()for simpler callback-based handling - Errors include type, code, message, ad unit ID, and timestamp
- Supports logging to analytics, crash reporting, or custom UI
- Subscribe to
- NEW: Comprehensive native ad factory documentation
- Added
doc/NATIVE_ADS_SETUP.mdwith platform code examples - Android (Kotlin) and iOS (Swift) factory implementations
- Layout XML and XIB templates
- Added
- BREAKING: Removed deprecated
AdConfigclass- Use
AdFlowConfig.currentfor static access to config values - Use
AdFlow.instance.configfor instance-based access - Cleaner API with no deprecation warnings
- Use
- IMPROVED: Simplified consent flow to match Google's official samples
- Sequential popup handling prevents stacking
- Explainer dialogs only shown when consent is actually needed
1.3.1 #
- NEW: Added
AdFlow.instance.reset()for testing- Enables proper unit testing of singleton state
- Clears all managers and resets initialization
- FIX: Fixed barrel export to use correct file (
ad_service.dart) - FIX: Fixed
use_build_context_synchronouslywarnings inBannerAdManager - IMPROVED: Added lazy initialization for ad managers
- Managers only created when first accessed
- Better memory efficiency for apps using subset of ad types
- IMPROVED: Expanded test coverage from 140 to 185 tests
- Added
AdFlowsingleton tests - Added
EasyBannerAdwidget tests - Added
ConsentManagertests
- Added
- Removed duplicate
ad_flow_service.dartfile
1.3.0 #
- NEW: Added
EasyPrivacySettingsButtonwidget for GDPR compliance- Auto shows/hides based on privacy options requirement
- Opens official Google privacy options form
- Customizable text, icon, and style
- NEW: Added
PrivacySettingsListTilefor settings screens - FIX:
initializeWithExplainer()now properly checks AdsEnabledManager- Previously skipped "Remove Ads" check, now matches
initialize()behavior
- Previously skipped "Remove Ads" check, now matches
- FIX:
isPrivacyOptionsRequired()now returns correct cached value- Was incorrectly returning
canRequestAdsinstead of privacy options status
- Was incorrectly returning
- Added production example with complete implementation guide
- Updated documentation with privacy button usage examples
1.2.0 #
- NEW: Added
RewardedAdManagerfor rewarded video ads- Watch ads to earn in-app rewards (coins, lives, etc.)
- Automatic preloading and retry logic
- Reward callbacks with type and amount
- Status listeners for UI updates
- Added
androidRewardedAdUnitIdandiosRewardedAdUnitIdtoAdFlowConfig - Added
TestAdUnitIds.rewardedfor testing - Re-exported
RewardedAdandRewardItemfrom google_mobile_ads - Updated example app with rewarded ads demo page
1.1.0 #
- BREAKING: Added
AdFlowConfigfor runtime configuration of ad unit IDs - Users can now configure ad unit IDs without modifying package source code
- Added
AdFlowConfig.testMode()factory for easy development/testing setup - Added
TestAdUnitIdsclass with Google's official test ad unit IDs AdConfigis now a proxy that reads fromAdFlowConfig- Updated example app to demonstrate new configuration pattern
1.0.2 #
- Added explicit platform support declaration for Android and iOS
1.0.1+1 #
- Code formatting fixes for pub.flutter-io.cn static analysis compliance
1.0.1 #
- Initial release
- Banner ads (adaptive and collapsible)
- Interstitial ads with cooldown management
- App open ads with lifecycle handling
- Native ads with factory support
- GDPR/ATT consent management via UMP SDK
- iOS App Tracking Transparency support
- Remove Ads feature with persistence
- Multi-language consent dialogs (English, Spanish, Persian)