onNewLinkFiveNewActiveProducts method
This method is the first entry point to notify all listeners that there are new plans available.
Implementation
LinkFiveActiveProducts onNewLinkFiveNewActiveProducts(LinkFiveActiveProducts activeProducts) {
latestLinkFiveActiveProducts = activeProducts;
_cleanAllStreams();
// notify observer
for (StreamController<LinkFiveActiveProducts> streamController in _streamControllerActiveProducts) {
LinkFiveLogger.d("push active sub data with size ${activeProducts.planList.length}, otp size: ${activeProducts.oneTimePurchaseList.length}");
streamController.add(activeProducts);
}
return activeProducts;
}