privacysuraksha_consent 0.1.1 copy "privacysuraksha_consent: ^0.1.1" to clipboard
privacysuraksha_consent: ^0.1.1 copied to clipboard

DPDP consent notice for Flutter apps — the Flutter shell of the Compliant mobile SDK.

example/lib/main.dart

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

void main() {
  CompliantConsent.onError = (e) => debugPrint('CompliantConsent error: $e');
  runApp(
    CompliantConsentProvider(
      config: CompliantConfiguration(
        siteKey: 'pk_test',
        apiBase: Uri.parse('https://api.example.com'),
      ),
      child: const ExampleApp(),
    ),
  );
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) => MaterialApp(
        home: Scaffold(
          body: Center(
            child: TextButton(
              onPressed: () => CompliantConsent.show(CompliantView.prefs),
              child: const Text('Privacy settings'),
            ),
          ),
        ),
      );
}
0
likes
140
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

DPDP consent notice for Flutter apps — the Flutter shell of the Compliant mobile SDK.

Homepage

License

unknown (license)

Dependencies

flutter, flutter_secure_storage, webview_flutter

More

Packages that depend on privacysuraksha_consent