Skip to content

Conversation

@bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Jul 29, 2025

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds several new properties to AdsRequest to align with the native IMA SDKs. The changes are well-structured and propagated through the platform interface to the Android and iOS implementations, with corresponding test updates.

My review identified a critical race condition in the Android implementation where the ad request could be sent before all its properties are set. I also found a related flaw in the Android test which incorrectly uses verifyInOrder for parallel operations. The iOS implementation and its tests are correct. I've provided suggestions to fix these issues.

The code otherwise adheres to the Flutter Packages Style Guide and follows Effective Dart conventions.

@bparrishMines bparrishMines changed the title feat(interactive_media_ads): add remaining methods to AdsRequest [interactive_media_ads]: Add remaining methods to AdsRequest Jul 31, 2025
@bparrishMines bparrishMines changed the title [interactive_media_ads]: Add remaining methods to AdsRequest [interactive_media_ads]: Adds better support to configure ad requests Jul 31, 2025
@bparrishMines bparrishMines changed the title [interactive_media_ads]: Adds better support to configure ad requests [interactive_media_ads]: Adds additional support to configure ad requests Jul 31, 2025
@bparrishMines bparrishMines changed the title [interactive_media_ads]: Adds additional support to configure ad requests [interactive_media_ads]: Adds additional methods to configure ad requests Jul 31, 2025
@bparrishMines bparrishMines marked this pull request as ready for review July 31, 2025 19:05
double? contentDuration,
List<String>? contentKeywords,
String? contentTitle,
double? liveStreamPrefetchSeconds,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not a Duration??

double? contentDuration,
List<String>? contentKeywords,
String? contentTitle,
double? liveStreamPrefetchSeconds,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same.

bool? adWillAutoPlay,
bool? adWillPlayMuted,
bool? continuousPlayback,
double? contentDuration,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Duration??

(If these stay doubles rather than Durations, this one needs a unit naming too.

bool? adWillAutoPlay,
bool? adWillPlayMuted,
bool? continuousPlayback,
double? contentDuration,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same.

List<String>? contentKeywords,
String? contentTitle,
double? liveStreamPrefetchSeconds,
double? vastLoadTimeout,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should also be a Duration? if possible. Especially since the units are different.

List<String>? contentKeywords,
String? contentTitle,
double? liveStreamPrefetchSeconds,
double? vastLoadTimeout,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same.

bool? adWillAutoPlay,
bool? adWillPlayMuted,
bool? continuousPlayback,
double? contentDuration,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comments throughout this class.

Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 4, 2025
@auto-submit auto-submit bot merged commit 28c35c6 into main Aug 4, 2025
80 checks passed
@auto-submit auto-submit bot deleted the add-ads-request-methods branch August 4, 2025 18:21
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 5, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Aug 5, 2025
flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
danilozhang pushed a commit to danilozhang/flutter that referenced this pull request Aug 6, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: interactive_media_ads Plugin for IMA SDK platform-android platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants