stopAutoRefresh method

Future<void> stopAutoRefresh()

Stop auto-refresh for the ad.

Throws StateError if called before the controller is attached to an ad view.

Implementation

Future<void> stopAutoRefresh() async {
  if (_adId == null) {
    throw StateError(
      'CloudXAdViewController is not attached to an ad view. '
      'Ensure the controller is passed to CloudXBannerView or CloudXMRECView.',
    );
  }
  await CloudX.stopAutoRefresh(adId: _adId!);
}