diff --git a/packages/google_mobile_ads/lib/src/ad_instance_manager.dart b/packages/google_mobile_ads/lib/src/ad_instance_manager.dart index 235dc77af..f89040c94 100644 --- a/packages/google_mobile_ads/lib/src/ad_instance_manager.dart +++ b/packages/google_mobile_ads/lib/src/ad_instance_manager.dart @@ -18,24 +18,25 @@ import 'dart:async'; import 'dart:collection'; +import 'dart:io'; -import 'package:google_mobile_ads/src/ad_inspector_containers.dart'; -import 'package:google_mobile_ads/src/ad_listeners.dart'; -import 'package:google_mobile_ads/src/mobile_ads.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; +import 'package:google_mobile_ads/src/ad_inspector_containers.dart'; +import 'package:google_mobile_ads/src/ad_listeners.dart'; +import 'package:google_mobile_ads/src/mobile_ads.dart'; import 'package:google_mobile_ads/src/nativetemplates/template_type.dart'; import 'package:google_mobile_ads/src/webview_controller_util.dart'; import 'package:webview_flutter/webview_flutter.dart'; import 'package:webview_flutter_android/webview_flutter_android.dart'; import 'package:webview_flutter_wkwebview/webview_flutter_wkwebview.dart'; +import 'ad_containers.dart'; import 'nativetemplates/native_template_font_style.dart'; import 'nativetemplates/native_template_style.dart'; import 'nativetemplates/native_template_text_style.dart'; import 'request_configuration.dart'; -import 'ad_containers.dart'; /// Loads and disposes [BannerAds] and [InterstitialAds]. AdInstanceManager instanceManager = AdInstanceManager( @@ -1317,9 +1318,9 @@ extension AdChoicesPlacementExtension on AdChoicesPlacement { int get intValue { switch (this) { case AdChoicesPlacement.topRightCorner: - return 0; + return Platform.isAndroid ? 1 : 0; case AdChoicesPlacement.topLeftCorner: - return 1; + return Platform.isAndroid ? 0 : 1; case AdChoicesPlacement.bottomRightCorner: return 2; case AdChoicesPlacement.bottomLeftCorner: @@ -1331,9 +1332,13 @@ extension AdChoicesPlacementExtension on AdChoicesPlacement { static AdChoicesPlacement? fromInt(int? intValue) { switch (intValue) { case 0: - return AdChoicesPlacement.topRightCorner; + return Platform.isAndroid + ? AdChoicesPlacement.topLeftCorner + : AdChoicesPlacement.topRightCorner; case 1: - return AdChoicesPlacement.topLeftCorner; + return Platform.isAndroid + ? AdChoicesPlacement.topRightCorner + : AdChoicesPlacement.topLeftCorner; case 2: return AdChoicesPlacement.bottomRightCorner; case 3: