File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
packages/google_mobile_ads Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
## 0.11.0+2
2
2
3
3
* Set min Android version to ` 19 ` .
4
+ * Fixes bug that displayed "This AdWidget is already in the Widget tree".
4
5
5
6
## 0.11.0+1
6
7
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ class AdInstanceManager {
116
116
void mountWidgetAdId (int adId) => _mountedWidgetAdIds.add (adId);
117
117
118
118
/// Indicates that [adId] is unmounted from the widget tree.
119
- void unmountWidgetAdId (int adId) => _mountedWidgetAdIds.add (adId);
119
+ void unmountWidgetAdId (int adId) => _mountedWidgetAdIds.remove (adId);
120
120
121
121
/// Starts loading the ad if not previously loaded.
122
122
///
Original file line number Diff line number Diff line change @@ -227,6 +227,9 @@ void main() {
227
227
listener: AdListener (),
228
228
request: AdRequest (),
229
229
);
230
+
231
+ await ad.load ();
232
+
230
233
try {
231
234
await tester.pumpWidget (
232
235
Directionality (
@@ -265,6 +268,9 @@ void main() {
265
268
listener: AdListener (),
266
269
request: AdRequest (),
267
270
);
271
+
272
+ await ad.load ();
273
+
268
274
final AdWidget widget = AdWidget (ad: ad);
269
275
try {
270
276
await tester.pumpWidget (
@@ -306,6 +312,7 @@ void main() {
306
312
listener: AdListener (),
307
313
request: AdRequest (),
308
314
);
315
+ await ad.load ();
309
316
final AdWidget widget = AdWidget (ad: ad);
310
317
try {
311
318
await tester.pumpWidget (
@@ -318,6 +325,9 @@ void main() {
318
325
),
319
326
),
320
327
);
328
+
329
+ await tester.pumpWidget (Container ());
330
+
321
331
await tester.pumpWidget (
322
332
Directionality (
323
333
textDirection: TextDirection .ltr,
You can’t perform that action at this time.
0 commit comments