gdpr_ads 0.1.0 copy "gdpr_ads: ^0.1.0" to clipboard
gdpr_ads: ^0.1.0 copied to clipboard

GDPR service, GDPR intermediate screen, Admob manager for loading and displaying

example/example.md

Wrapper-Widget for GdprPage #

The widget below is a simple wrapper to make [GdprPage] reusable with the same configuration.

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:gdpr_ads/ads/adservice.dart';
import 'package:gdpr_ads/gdpr/gdprpage.dart';
import 'package:gdpr_ads/gdpr/gdprservice.dart';

class GdprCheckWrapper extends StatelessWidget {
  final bool resetConfirmationForm;

  const GdprCheckWrapper({this.resetConfirmationForm = false, Key? key})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GdprPage(
      () async {
        AdService().initialize(
            bannerIds: [Config.bannerAdId],
            interstitialIds: [Config.interstitialAdId],
            interRewardIds: [Config.interRewardAdId],
            testDeviceIds: Config.testDeviceIds);
      },
      () {
        Navigator.of(context).pushReplacement(
          MaterialPageRoute(builder: (context) => const AfterGdprPage()),
        );
      },
      debugTestIdentifiers: Config.testDeviceIds,
      showDebugUI: kDebugMode,
      debugResetConsentForm: resetConfirmationForm,
      loadingWidget: const Center(child: CircularProgressIndicator()),
      debugGeography: GdprDebugGeography.disabled,
    );
  }
}
6
likes
0
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

GDPR service, GDPR intermediate screen, Admob manager for loading and displaying

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async_preferences, flutter, google_mobile_ads

More

Packages that depend on gdpr_ads