[interactive_media_ads]: Adds additional methods to configure ad requests#9696
[interactive_media_ads]: Adds additional methods to configure ad requests#9696auto-submit[bot] merged 11 commits intomainfrom
Conversation
There was a problem hiding this comment.
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.
| double? contentDuration, | ||
| List<String>? contentKeywords, | ||
| String? contentTitle, | ||
| double? liveStreamPrefetchSeconds, |
There was a problem hiding this comment.
Why not a Duration??
| double? contentDuration, | ||
| List<String>? contentKeywords, | ||
| String? contentTitle, | ||
| double? liveStreamPrefetchSeconds, |
| bool? adWillAutoPlay, | ||
| bool? adWillPlayMuted, | ||
| bool? continuousPlayback, | ||
| double? contentDuration, |
There was a problem hiding this comment.
Duration??
(If these stay doubles rather than Durations, this one needs a unit naming too.
| bool? adWillAutoPlay, | ||
| bool? adWillPlayMuted, | ||
| bool? continuousPlayback, | ||
| double? contentDuration, |
| List<String>? contentKeywords, | ||
| String? contentTitle, | ||
| double? liveStreamPrefetchSeconds, | ||
| double? vastLoadTimeout, |
There was a problem hiding this comment.
This should also be a Duration? if possible. Especially since the units are different.
| List<String>? contentKeywords, | ||
| String? contentTitle, | ||
| double? liveStreamPrefetchSeconds, | ||
| double? vastLoadTimeout, |
| bool? adWillAutoPlay, | ||
| bool? adWillPlayMuted, | ||
| bool? continuousPlayback, | ||
| double? contentDuration, |
There was a problem hiding this comment.
Same comments throughout this class.
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
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
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
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
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
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
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).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-assistbot 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
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