From a1b41d8c1aac71850a63a1a6c84514ed884ef6fd Mon Sep 17 00:00:00 2001 From: Morteza Nedaei Date: Mon, 19 Aug 2024 08:18:07 +0000 Subject: [PATCH] Publish version 2.2.7 --- example/lib/main.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 6fa113f..9df6866 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -328,8 +328,7 @@ class _MyAppState extends State { return; } TapsellPlus.instance.requestStandardBannerAd( - zoneId, TapsellPlusBannerType.BANNER_320x50, - onResponse: (map) { + zoneId, TapsellPlusBannerType.BANNER_320x50, onResponse: (map) { log('Standard Ad is "READY"', tag: '--standard'); setResponseId(map['response_id'] ?? ''); }, onError: (map) { @@ -396,13 +395,14 @@ class _MyAppState extends State { log("AdNetwork '$adNetwork' does not support NativeAd"); return; } - TapsellPlus.instance.requestNativeAd(zoneId).then((value) { + TapsellPlus.instance.requestNativeAd(zoneId, onResponse: (map) { log('Native Ad is "READY"', tag: '--native'); - print('requestNativeAd:' + value.entries.toString()); - setResponseId(value['response_id']); - setUnitId(value['adnetwork_zone_id'] ?? ""); - }).catchError((error) { - log('Error requesting ad - $error', tag: '--native-status'); + print('requestNativeAd:' + map.entries.toString()); + setResponseId(map['response_id'] ?? ""); + setUnitId(map['adnetwork_zone_id'] ?? ""); + }, onError: (map) { + log('Error requesting ad - ${map.entries}', + tag: '--native-status'); }); } },