resubscribe_flutter_sdk 1.0.6 copy "resubscribe_flutter_sdk: ^1.0.6" to clipboard
resubscribe_flutter_sdk: ^1.0.6 copied to clipboard

The Flutter sdk for Resubscribe

Resubscribe Flutter SDK #

Flutter SDK for Resubscribe.

Installation #

https://pub.dev/packages/resubscribe_flutter_sdk

Usage #

Add a showResubscribe variable to your state.

bool showResubscribe = false;

Trigger the ResubscribeSDK by setting showResubscribe to true.

setState(() {
  showResubscribe = true;
});

Add the ResubscribeSDK to your widget tree.

if (showResubscribe)
  ResubscribeSDK(
    loadingColor: Colors.black,
    backgroundColor: Colors.white,
    aiType: 'intent', // Replace with the AI type
    uid: '{userid}', // Replace with the user ID
    slug: 'test', // Replace with your slug
    debugMode: true,
    onClose: () {
      setState(() {
        showResubscribe = false;
      });
    },
  ),

Android #

Make sure your device has the following permissions:

<uses-permission android:name="android.permission.INTERNET" />

Customization #

The text on the consent popup is already customized to the AI type you choose.

However, if you want to override these values, then you can pass in the consentOptions to the ResubscribeSDK.

ResubscribeSDK(
  // ...
  consentOptions: const ResubscribeConsentOptions(
    acceptText: 'Let\'s chat!',
    declineText: 'Not right now',
    titleOverride: 'CUSTOM TITLE',
    contentOverride: 'CUSTOM CONTENT',
  ),
  // ...
)

Dialog modals

The dialogs are instances of Flutter's AlertDialog. They can be customized via ThemeData;

0
likes
0
pub points
17%
popularity

Publisher

unverified uploader

The Flutter sdk for Resubscribe

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on resubscribe_flutter_sdk