reload method

Future<bool> reload({
  1. bool? forceLoad,
})

Requests placement reload. Works only if automatic reloading is disabled. forceLoad: True if you want to clear the previously loaded ad before loading a new one.

Returns 'true' if call ends in causing a placement to reload, 'false' otherwise.

Implementation

Future<bool> reload({bool? forceLoad}) async {
  try {
    if (forceLoad != null) {
      return AatkitFlutterPluginPlatform.instance
          .reloadAppOpenAdForced(name, forceLoad);
    } else {
      return AatkitFlutterPluginPlatform.instance.reloadAppOpenAd(name);
    }
  } on PlatformException catch (e) {
    aatkitLog("PlatformException, error: $e");
    return false;
  }
}