Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
131811f
run pigeon
bparrishMines Aug 11, 2025
dc9ed24
add missing apis
bparrishMines Aug 11, 2025
406e507
tests
bparrishMines Aug 11, 2025
07122c9
fix tests sort of
bparrishMines Aug 11, 2025
9acd11c
try fix tests maybe
bparrishMines Aug 11, 2025
038f303
fix version bump
bparrishMines Aug 12, 2025
bf56d72
fix tests
bparrishMines Aug 13, 2025
2f37abc
update adevent to
bparrishMines Aug 13, 2025
db23655
changelog update
bparrishMines Aug 13, 2025
84a9fba
Merge branch 'main' of github.com:flutter/packages into ima_ad_ios
bparrishMines Aug 13, 2025
dff3de9
fix pigeon code
bparrishMines Aug 13, 2025
660aa72
support a string value
bparrishMines Aug 14, 2025
3af4706
fix tests
bparrishMines Aug 14, 2025
5929f30
Merge branch 'main' of github.com:flutter/packages into ima_ad_ios
bparrishMines Aug 14, 2025
b00649e
comment the code
bparrishMines Aug 14, 2025
52d7635
Merge branch 'main' of github.com:flutter/packages into ima_ad_ios
bparrishMines Aug 18, 2025
7f77c09
version bump
bparrishMines Aug 18, 2025
473357a
improve ad proxy code
bparrishMines Aug 19, 2025
37ce423
Merge branch 'main' of github.com:flutter/packages into ima_ad_ios
bparrishMines Aug 19, 2025
711064b
start of implementation
bparrishMines Aug 19, 2025
88541d8
platform implementations
bparrishMines Sep 7, 2025
3f2bc4a
Merge branch 'main' of github.com:flutter/packages into ima_ad_event_ad
bparrishMines Sep 7, 2025
5839848
app facing interface implementation
bparrishMines Sep 7, 2025
457ffe5
fix tests
bparrishMines Sep 7, 2025
701e8e7
version bump
bparrishMines Sep 7, 2025
6bff03f
make resource value nullable
bparrishMines Sep 7, 2025
7f30199
analyze error
bparrishMines Sep 9, 2025
634dbf5
Merge branch 'main' of github.com:flutter/packages into ima_ad_event_ad
bparrishMines Sep 9, 2025
575eebd
update docs and add null checks
bparrishMines Sep 11, 2025
8567b5a
add test for android ads
bparrishMines Sep 12, 2025
ccc3ad1
tests for ios
bparrishMines Sep 12, 2025
4e93744
actually add ios tests
bparrishMines Sep 12, 2025
bc89942
include ad for test
bparrishMines Sep 12, 2025
f2bccf7
Merge branch 'main' of github.com:flutter/packages into ima_ad_event_ad
bparrishMines Sep 12, 2025
76693c0
Merge branch 'main' of github.com:flutter/packages into ima_ad_event_ad
bparrishMines Sep 26, 2025
ba27a6a
update licenses
bparrishMines Sep 26, 2025
dda426c
update mocks
bparrishMines Sep 30, 2025
abdfa17
Merge branch 'main' of github.com:flutter/packages into ima_ad_event_ad
bparrishMines Sep 30, 2025
7d8f720
some comment fixes
bparrishMines Oct 1, 2025
88c1c05
erge branch 'main' of github.com:flutter/packages into ima_ad_event_ad
bparrishMines Oct 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
some comment fixes
  • Loading branch information
bparrishMines committed Oct 1, 2025
commit 7d8f720ee6754d247d914ca337bad50e2b97db9a
24 changes: 14 additions & 10 deletions packages/interactive_media_ads/lib/src/ad.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ class Ad {
/// The duration of the ad.
Duration? get duration => platform.duration;

/// The width of the selected creative if non-linear, else returns 0.
int get width => platform.width;

/// The height of the selected creative if non-linear, else returns 0.
int get height => platform.height;

Expand Down Expand Up @@ -95,9 +98,6 @@ class Ad {
/// The VAST media width in pixels of the selected creative.
int get vastMediaWidth => platform.vastMediaWidth;

/// The width of the selected creative if non-linear, else returns 0.
int get width => platform.width;

/// Indicates whether the ad’s current mode of operation is linear or
/// non-linear.
bool get isLinear => platform.isLinear;
Expand Down Expand Up @@ -166,17 +166,21 @@ class CompanionAd {
/// Implementation of [PlatformCompanionAd] for the current platform.
final PlatformCompanionAd platform;

/// The API needed to execute this ad, or null if unavailable.
String? get apiFramework => platform.apiFramework;
/// The width of the companion in pixels.
///
/// `null` if unavailable.
int? get width => platform.width;

/// The height of the companion in pixels.
///
/// `null` if unavailable.
int? get height => platform.height;

/// The API needed to execute this ad, or null if unavailable.
String? get apiFramework => platform.apiFramework;

/// The URL for the static resource of this companion.
String? get resourceValue => platform.resourceValue;

/// The width of the companion in pixels.
int? get width => platform.width;
}

/// Simple data object containing universal ad ID information.
Expand All @@ -190,10 +194,10 @@ class UniversalAdId {
/// The universal ad ID value.
///
/// This will be null if it isn’t defined by the ad.
String? get adIDValue => platform.adIDValue;
String? get adIdValue => platform.adIdValue;

/// The universal ad ID registry with which the value is registered.
///
/// This will be null if it isn’t defined by the ad.
String? get adIDRegistry => platform.adIDRegistry;
String? get adIdRegistry => platform.adIdRegistry;
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ PlatformUniversalAdId _asPlatformUniversalAdId(
ima.UniversalAdId universalAdId,
) {
return PlatformUniversalAdId(
adIDValue:
adIdValue:
universalAdId.adIdValue == 'unknown' ? null : universalAdId.adIdValue,
adIDRegistry:
adIdRegistry:
universalAdId.adIdRegistry == 'unknown'
? null
: universalAdId.adIdRegistry,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ PlatformUniversalAdId _asPlatformUniversalAdId(
ima.IMAUniversalAdID universalAdId,
) {
return PlatformUniversalAdId(
adIDValue:
adIdValue:
universalAdId.adIDValue == 'unknown' ? null : universalAdId.adIDValue,
adIDRegistry:
adIdRegistry:
universalAdId.adIDRegistry == 'unknown'
? null
: universalAdId.adIDRegistry,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ base class PlatformAd {
required this.dealId,
required this.description,
required this.duration,
required this.width,
required this.height,
required this.skipTimeOffset,
required this.surveyUrl,
Expand All @@ -33,9 +34,8 @@ base class PlatformAd {
required this.uiElements,
required this.universalAdIds,
required this.vastMediaBitrate,
required this.vastMediaHeight,
required this.vastMediaWidth,
required this.width,
required this.vastMediaHeight,
required this.isLinear,
required this.isSkippable,
});
Expand Down Expand Up @@ -86,6 +86,9 @@ base class PlatformAd {
/// The duration of the ad.
final Duration? duration;

/// The width of the selected creative if non-linear, else returns 0.
final int width;

/// The height of the selected creative if non-linear, else returns 0.
final int height;

Expand All @@ -111,14 +114,11 @@ base class PlatformAd {
/// The VAST bitrate in Kbps of the selected creative.
final int vastMediaBitrate;

/// The VAST media height in pixels of the selected creative.
final int vastMediaHeight;

/// The VAST media width in pixels of the selected creative.
final int vastMediaWidth;

/// The width of the selected creative if non-linear, else returns 0.
final int width;
/// The VAST media height in pixels of the selected creative.
final int vastMediaHeight;

/// Indicates whether the ad’s current mode of operation is linear or
/// non-linear.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@
base class PlatformCompanionAd {
/// Constructs a [PlatformCompanionAd].
PlatformCompanionAd({
required this.apiFramework,
required this.width,
required this.height,
required this.apiFramework,
required this.resourceValue,
required this.width,
});

/// The API needed to execute this ad, or null if unavailable.
final String? apiFramework;
/// The width of the companion in pixels.
///
/// `null` if unavailable.
final int? width;

/// The height of the companion in pixels.
///
/// `null` if unavailable.
final int? height;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do null height/width mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


/// The API needed to execute this ad, or null if unavailable.
final String? apiFramework;

/// The URL for the static resource of this companion.
final String? resourceValue;

/// The width of the companion in pixels.
final int? width;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
/// Simple data object containing universal ad ID information.
base class PlatformUniversalAdId {
/// Constructs a [PlatformUniversalAdId].
PlatformUniversalAdId({required this.adIDValue, required this.adIDRegistry});
PlatformUniversalAdId({required this.adIdValue, required this.adIdRegistry});

/// The universal ad ID value.
///
/// This will be null if it isn’t defined by the ad.
final String? adIDValue;
final String? adIdValue;

/// The universal ad ID registry with which the value is registered.
///
/// This will be null if it isn’t defined by the ad.
final String? adIDRegistry;
final String? adIdRegistry;
}
4 changes: 2 additions & 2 deletions packages/interactive_media_ads/test/android/ad_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ void main() {
AndroidAdsManagerDelegate(
PlatformAdsManagerDelegateCreationParams(
onAdEvent: expectAsync1((PlatformAdEvent event) {
expect(event.ad!.universalAdIds.single.adIDValue, isNull);
expect(event.ad!.universalAdIds.single.adIDRegistry, isNull);
expect(event.ad!.universalAdIds.single.adIdValue, isNull);
expect(event.ad!.universalAdIds.single.adIdRegistry, isNull);
}),
),
),
Expand Down
4 changes: 2 additions & 2 deletions packages/interactive_media_ads/test/ios/ad_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ void main() {
final IOSAdsManagerDelegate adsManagerDelegate = IOSAdsManagerDelegate(
IOSAdsManagerDelegateCreationParams(
onAdEvent: expectAsync1((PlatformAdEvent event) {
expect(event.ad!.universalAdIds.single.adIDValue, isNull);
expect(event.ad!.universalAdIds.single.adIDRegistry, isNull);
expect(event.ad!.universalAdIds.single.adIdValue, isNull);
expect(event.ad!.universalAdIds.single.adIdRegistry, isNull);
}),
),
);
Expand Down