@@ -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
0 commit comments