showConsentFormIfNeeded function

Future<void> showConsentFormIfNeeded()

Implementation

Future<void> showConsentFormIfNeeded() async {
  // Do not show consent form on web or macOS.
  if (isWeb || isMacOS) return;

  // Checks if the application is set to ad-free mode.
  final isAdFree = isAdFreeEnabled();

  if (!isAdFree) {
    const event = FastAdInfoBlocEvent.askForConsentIfNeeded();
    FastAdInfoBloc.instance.addEvent(event);
  }
}