FlutterGromore class

Constructors

FlutterGromore()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

isInit bool
SDK是否初始化
getter/setter pair

Static Methods

initSDK({required String appId, required String appName, required bool debug, required bool useMediation, bool? paid = false, bool? allowShowNotify = false, bool? useTextureView = false, bool? supportMultiProcess = false, int? themeStatus = 0}) Future<bool>
初始化SDK
loadFeedAd(GromoreFeedConfig config) Future<List<String>>
加载信息流广告
loadInterstitialAd(GromoreInterstitialConfig config) Future<String>
加载插屏广告
loadRewardAd(GromoreRewardConfig config) Future<String>
加载激励广告 加载失败会返回空字符串
removeFeedAd(String feedId) Future<void>
移除信息流广告
removeInterstitialAd(String interstitialId) Future<void>
移除信息流广告
requestATT() Future<void>
申请ATT权限 以往广告归因依赖于IDFA。从iOS 14开始,只有在获得用户明确许可的前提下,应用才可以访问用户的IDFA数据并向用户投放定向广告。在应用程序调用 App Tracking Transparency 框架向最终用户提出应用程序跟踪授权请求之前,IDFA将不可用。如果某个应用未提出此请求,则读取到的IDFA将返回全为0的字符串,这个可能会导致广告收入降低。 需要在App层级的info.plist里添加ATT权限描述
requestPermissionIfNecessary() Future<void>
权限申请 同时请求:READ_PHONE_STATE, COARSE_LOCATION, FINE_LOCATION, WRITE_EXTERNAL_STORAGE权限
showInterstitialAd({required String interstitialId, GromoreInterstitialCallback? callback}) Future<void>
展示插屏广告
showRewardAd({required String rewardId, GromoreRewardCallback? callback}) Future<bool>
展示激励广告 返回值表示是否展示成功 若需验证是否有效发放奖励,请在GromoreRewardCallback中传入onRewardVerify回调
showSplashAd({required GromoreSplashConfig config, required GromoreBaseAdCallback callback}) Future<void>
展示开屏广告