initialize method
void
initialize(
- List<
BannerResponse> banners, - ScrollController? scrollController,
- RelevaClient? client
Implementation
void initialize(List<BannerResponse> banners, ScrollController? scrollController, RelevaClient? client) {
debugPrint('[BannerManagerService] initialize called with ${banners.length} banners');
_banners.clear();
_banners.addAll(banners);
_scrollController = scrollController;
_client = client;
// Clear previous subscriptions
for (var subscription in _subscriptions) {
subscription.cancel();
}
_subscriptions.clear();
// Clear displayed banners so they can be shown again when returning to screen
debugPrint('[BannerManagerService] Clearing _displayedBanners (had ${_displayedBanners.length} entries)');
_displayedBanners.clear();
_setupTriggers();
}