redacto_consent_sdk

Flutter SDK for Redacto consent management.

Installation

flutter pub add redacto_consent_sdk

RedactoNoticeConsent

showModalBottomSheet(
  context: context,
  isDismissible: false,
  builder: (_) => RedactoNoticeConsent(
    noticeId: noticeUuid,
    accessToken: accessToken,
    refreshToken: refreshToken,
    blockUI: true,
    onAccept: () {},
    onDecline: () {},
    onError: (error) {},
  ),
);

Main properties

  • noticeId (required): notice UUID
  • accessToken (required): JWT access token
  • refreshToken (required): refresh token for parity with mobile SDKs
  • baseUrl: override API base URL (defaults to https://api.redacto.io/consent)
  • validateAgainst: ValidateAgainst.all or ValidateAgainst.required
  • includeFullyConsentedData: include already-consented data in payload
  • onAccept / onDecline: user action callbacks
  • onError: API or rendering error callback

RedactoNoticeConsentInline

Inline consent component for embedding consent state into existing screens.

RedactoNoticeConsentInline(
  noticeId: noticeUuid,
  accessToken: accessToken,
  onAccept: () {},
  onValidationChange: (isValid) {},
)

Development

cd packages/consent-sdk-flutter
flutter pub get
dart analyze
flutter test