adBadgeConfiguration property
The configuration for ad badges.
Implementation
AdBadgeConfiguration? get adBadgeConfiguration => _adBadgeConfiguration;
Implementation
set adBadgeConfiguration(AdBadgeConfiguration? adBadgeConfiguration) {
final valueHasChanged = _adBadgeConfiguration?.badgeTextType !=
adBadgeConfiguration?.badgeTextType ||
_adBadgeConfiguration?.backgroundColor !=
adBadgeConfiguration?.backgroundColor ||
_adBadgeConfiguration?.textColor != adBadgeConfiguration?.textColor;
_adBadgeConfiguration = adBadgeConfiguration;
final nativeMethodName =
FireworkSDKNativeMethodName.setAdBadgeConfiguration.name;
Map<String, dynamic> arg = {};
if (adBadgeConfiguration != null) {
arg = AdBadgeConfigurationUtil.toJson(adBadgeConfiguration);
}
FWMethodChannelUtil.getFirewokSDKChannel()
.invokeMethod(nativeMethodName, arg)
.then((_) {
if (valueHasChanged) {
FWEventBus.getInstance().fire(
FWEvent(
eventName: FWEventName.adBadgeConfigurationUpdated,
),
);
}
});
}