Skip to content

Commit b717188

Browse files
committed
style: format misc
1 parent b748c85 commit b717188

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

lib/ads/admob_ad_provider.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ class AdMobAdProvider implements AdProvider {
336336
_logger.info('AdMobAdProvider: Attempting to dispose ad object: $adObject');
337337
if (adObject is admob.Ad) {
338338
await adObject.dispose();
339-
_logger.info('AdMobAdProvider: Disposed AdMob ad object (NativeAd, BannerAd, or InterstitialAd).');
339+
_logger.info(
340+
'AdMobAdProvider: Disposed AdMob ad object (NativeAd, BannerAd, or InterstitialAd).',
341+
);
340342
} else {
341343
_logger.warning(
342344
'AdMobAdProvider: Attempted to dispose a non-AdMob ad object. '

lib/ads/inline_ad_cache_service.dart

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ class InlineAdCacheService {
4545

4646
final Logger _logger;
4747

48-
/// The [AdService] instance used for disposing inline ad objects.
49-
/// This is set via the factory constructor.
50-
late AdService _adService;
48+
/// The [AdService] instance used for disposing inline ad objects.
49+
/// This is set via the factory constructor.
50+
late AdService _adService;
5151

52-
/// A map to store loaded inline ad objects, keyed by their unique ID.
53-
///
54-
/// The value is nullable to allow for explicit removal of an ad from the cache.
55-
final Map<String, InlineAd?> _cache = {};
52+
/// A map to store loaded inline ad objects, keyed by their unique ID.
53+
///
54+
/// The value is nullable to allow for explicit removal of an ad from the cache.
55+
final Map<String, InlineAd?> _cache = {};
5656

57-
/// Retrieves an [InlineAd] from the cache using its [id].
58-
///
59-
/// Returns the cached [InlineAd] if found, otherwise `null`.
60-
InlineAd? getAd(String id) {
57+
/// Retrieves an [InlineAd] from the cache using its [id].
58+
///
59+
/// Returns the cached [InlineAd] if found, otherwise `null`.
60+
InlineAd? getAd(String id) {
6161
final ad = _cache[id];
6262
if (ad != null) {
6363
_logger.info('Retrieved inline ad with ID "$id" from cache.');
@@ -73,7 +73,9 @@ InlineAd? getAd(String id) {
7373
void setAd(String id, InlineAd? ad) {
7474
if (_cache.containsKey(id) && _cache[id] != null) {
7575
// If an old ad exists for this ID, dispose of its resources.
76-
_logger.info('Disposing old inline ad for ID "$id" before caching new one.');
76+
_logger.info(
77+
'Disposing old inline ad for ID "$id" before caching new one.',
78+
);
7779
_adService.disposeAd(_cache[id]);
7880
}
7981

lib/ads/widgets/admob_inline_ad_widget.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ class _AdmobInlineAdWidgetState extends State<AdmobInlineAdWidget> {
7171
// when the widget is scrolled out of view and then back in.
7272
// The ad will be disposed when InlineAdCacheService.clearAllAds() is called,
7373
// typically on a full feed refresh.
74-
_logger.info('AdmobInlineAdWidget disposed. Ad object lifecycle managed by InlineAdCacheService.');
74+
_logger.info(
75+
'AdmobInlineAdWidget disposed. Ad object lifecycle managed by InlineAdCacheService.',
76+
);
7577
super.dispose();
7678
}
7779

lib/ads/widgets/feed_ad_loader_widget.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class _FeedAdLoaderWidgetState extends State<FeedAdLoaderWidget> {
6262
bool _hasError = false;
6363
final Logger _logger = Logger('FeedAdLoaderWidget');
6464
late final InlineAdCacheService _adCacheService;
65-
late final AdService _adService; // AdService will be accessed via _adCacheService
65+
late final AdService
66+
_adService; // AdService will be accessed via _adCacheService
6667

6768
/// Completer to manage the lifecycle of the ad loading future.
6869
/// This helps in cancelling pending operations if the widget is disposed

lib/ads/widgets/in_article_ad_loader_widget.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class _InArticleAdLoaderWidgetState extends State<InArticleAdLoaderWidget> {
5959
bool _hasError = false;
6060
final Logger _logger = Logger('InArticleAdLoaderWidget');
6161
late final InlineAdCacheService _adCacheService;
62-
late final AdService _adService; // AdService will be accessed via _adCacheService
62+
late final AdService
63+
_adService; // AdService will be accessed via _adCacheService
6364

6465
Completer<void>? _loadAdCompleter;
6566

0 commit comments

Comments
 (0)