⚖️Consent

When you use the authentication function, the second parameter should be a callback function (this can also be an arrow function). This function will be called when legal documents have been updated in the FibriCheck cloud and the end-user needs to reapprove these. Example showing how to hook changes to legal documents change with your application and calling the giveConsent function with the document after the user has approved these.

import 'package:flutter_fibricheck_sdk/flutter_fibricheck_sdk.dart';

_sdk.authenticateWithEmail(
        ParamsOauth1WithEmail(
          email: "",
          password: "",
        ),
        onConsentNeeded);
        
void onConsentNeeded(List<Consent> documentsToSign) {
    for (var document in documentsToSign) {
      {
        // 1. Request approval from the user

        // 2. Pass the document back to the sdk
        _sdk.giveConsent(document);
      }
    }
  }

Last updated