redacto_consent_sdk 0.1.0
redacto_consent_sdk: ^0.1.0 copied to clipboard
Flutter SDK for integrating Redacto consent notices.
example/lib/main.dart
import "package:redacto_consent_sdk/redacto_consent_sdk.dart";
import "package:flutter/material.dart";
void main() {
runApp(const ExampleApp());
}
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text("Consent SDK Flutter Example")),
body: Builder(
builder: (context) {
return Center(
child: ElevatedButton(
onPressed: () {
showModalBottomSheet<void>(
context: context,
isScrollControlled: true,
builder: (_) => RedactoNoticeConsent(
noticeId: "notice-uuid",
accessToken: "access-token",
refreshToken: "refresh-token",
onAccept: () => Navigator.pop(context),
onDecline: () => Navigator.pop(context),
),
);
},
child: const Text("Open consent modal"),
),
);
},
),
),
);
}
}