Banner Cache
Integrate banner cache
Note
Banner cache is currently only available on the 3.3-beta-release branch.
Create Banner Cache
To create banner cache, call createBannerCache
method:
You can change the cache configuration if needed. Please modify corresponding variables or pass more parameters to the constructor of BannerCacheConfiguration
(Android) orAATBannerCacheConfiguration
(iOS):
Consume Banners
Next banner is consumed automatically when adding AATKitBanner
widget with passed type
parameter as AATKitBannerType.cached:
Destroy old banner
Banner is destroyed automatically when AATKitBanner
widget is no longer attached to the UI.
Destroy no longer needed BannerCache
For proper memory management, BannerCache needs to be destroyed when is no longer needed. The destroyBannerCache
method destroys the BannerCache:
Code Example
Please see list_page.dart to check how banner cache is integrated within ListView
widget. Please note our example app requires to call creating banner cache manually by pressing the Create banner cache
button from the home_page.dart.
Last updated