sourcepoint_cmp 0.0.1 copy "sourcepoint_cmp: ^0.0.1" to clipboard
sourcepoint_cmp: ^0.0.1 copied to clipboard

outdated

Simple plugin to use the Sourcepoint CMP with Flutter.

sourcepoint_cmp #

Flutter Plugin for integrating Sourcepoint CMP

Usage #

To use this plugin, add sourcepoint_cmp as a dependency in your pubspec.yaml file.

Example #

import 'package:flutter/material.dart';
import 'package:sourcepoint_cmp/sourcepoint_cmp.dart';

  @override
  void initState() {
    super.initState();

    _sourcepointCmp = SourcepointCmp(
        accountId: 22,
        propertyId: 7639,
        propertyName: "tcfv2.mobile.webview",
        pmId: "122058",
        onConsentReady: () {
          print('consentReady');
        },
        onError: (errorCode) {
          print('consentError: errorCode:$errorCode');
        });

    //Show on Start
    _sourcepointCmp.load();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: const Text('Plugin example app'),
          ),
          body: Column(
            children: [
              Center(
                child: FlatButton(
                  color: Colors.blue,
                  textColor: Colors.white,
                  disabledColor: Colors.grey,
                  disabledTextColor: Colors.black,
                  padding: EdgeInsets.all(8.0),
                  splashColor: Colors.blueAccent,
                  onPressed: () {
                    _sourcepointCmp.showPM(); //show Privacy Manager
                  },
                  child: Text(
                    "Show PrivacyManager",
                    style: TextStyle(fontSize: 20.0),
                  ),
                ),
              ),
            ],
          )),
    );
  }


1
likes
0
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

Simple plugin to use the Sourcepoint CMP with Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on sourcepoint_cmp