enroll_plugin 1.3.9 copy "enroll_plugin: ^1.3.9" to clipboard
enroll_plugin: ^1.3.9 copied to clipboard

eNROLL is a compliance solution that prevents identity fraud and phishing. Powered by AI, it reduces errors and speeds up identification, ensuring secure verification.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

/// Example theme combining custom colors and icons.
///
/// To use custom icons, add PNG/XML drawables to:
///   example/android/app/src/main/res/drawable/
/// Then reference them by name (without extension) in [EnrollStepIcon.assetName].
final EnrollTheme _exampleTheme = EnrollTheme(
  colors: EnrollColors(
    primary: Color(0xFF756C10),
    secondary: Color(0xFF192537),
  ),
  icons: const EnrollIcons(
    logo: EnrollLogoConfig(
      mode: EnrollLogoMode.custom,
      assetName: 'sample_location_icon',
      renderingMode: EnrollIconRenderingMode.original,
    ),
    location: EnrollLocationIcons(
      tutorial: EnrollStepIcon(
        assetName: 'sample_location_icon',
        renderingMode: EnrollIconRenderingMode.original,
      ),
    ),
    faceMatching: EnrollFaceMatchingIcons(
    tutorial: EnrollStepIcon(assetName: "")
    ),
    nationalId: EnrollNationalIdIcons(
      tutorial: EnrollStepIcon(
        assetName: 'sample_location_icon',
        renderingMode: EnrollIconRenderingMode.original,
      ),
      tutorialIdOrPassport: EnrollStepIcon(
        assetName: 'sample_location_icon',
        renderingMode: EnrollIconRenderingMode.original,
      ),
    ),
    common: EnrollCommonIcons(
      termsAndConditions: EnrollStepIcon(
        assetName: 'enroll_example_terms',
        renderingMode: EnrollIconRenderingMode.original,
      ),
      popups: EnrollPopupIcons(
        successIcon: EnrollStepIcon(
          assetName: 'enroll_example_success',
          renderingMode: EnrollIconRenderingMode.original,
        ),
      ),
    ),
  ),
);

/// My App
class MyApp extends StatefulWidget {
  /// My App constructor
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: Builder(builder: (context) {
      return Scaffold(
        body: EnrollPlugin(

          mainScreenContext: context,
          tenantId: 'TENANT_ID',
          tenantSecret: 'TENANT_SECRET',
          requestId: 'REQUEST_ID',
          enrollMode: EnrollMode.onboarding,
          enrollEnvironment: EnrollEnvironment.staging,
          onSuccess: (applicantId) {
            WidgetsBinding.instance.addPostFrameCallback((_) {
              debugPrint("success: $applicantId");
            });
          },
          onError: (error) {
            WidgetsBinding.instance.addPostFrameCallback((_) {
              debugPrint("Error: ${error.toString()}");
            });
          },
          onGettingRequestId: (requestId) {
            WidgetsBinding.instance.addPostFrameCallback((_) {
              debugPrint("requestId:: $requestId");
            });
          },
          localizationCode: EnrollLocalizations.ar,
          applicationId: '',
          skipTutorial: false,
          levelOfTrust: 'LEVEL_OF_TRUST_TOKEN',
          googleApiKey: 'GOOGLE_API_KEY',
          correlationId: 'correlationIdTest',
          templateId: "templateId",
          contractParameters: "contractParameters",
          // appColors: EnrollColors(
          //   primary: Color(0xFF756C10),
          //   secondary: Color(0xFF192537),
          //   appBlack: Color(0xFF000000),
          //   appWhite: Color(0xFFFFFFFF),
          // ),


          // enrollTheme: _exampleTheme,
          // enrollExitStep: EnrollStepType.personalConfirmation,
        ),
      );
    }));
  }
}
4
likes
140
points
450
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

eNROLL is a compliance solution that prevents identity fraud and phishing. Powered by AI, it reduces errors and speeds up identification, ensuring secure verification.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on enroll_plugin

Packages that implement enroll_plugin