EnrollPlugin class

The EnrollPlugin widget is the main widget responsible for handling the enrollment process in the eNROLL plugin.

It takes configuration options such as localization, environment, mode, and various callbacks for handling success, errors, and request IDs.

Inheritance

Constructors

EnrollPlugin({Key? key, EnrollLocalizations localizationCode = EnrollLocalizations.en, EnrollEnvironment enrollEnvironment = EnrollEnvironment.staging, EnrollMode enrollMode = EnrollMode.onboarding, required String tenantId, required String tenantSecret, required dynamic onSuccess(String applicantId), required dynamic onError(String error), required dynamic onGettingRequestId(String requestId), required BuildContext mainScreenContext, String? googleApiKey, EnrollColors? enrollColors, String? levelOfTrust, String? applicationId, String? requestId, String? templateId, String? contractParameters, bool? skipTutorial, String? correlationId, EnrollForcedDocumentType? enrollForcedDocumentType})
Constructor for the EnrollPlugin widget.
const

Properties

applicationId String?
The ID of the application, used for authentication mode.
final
contractParameters String?
The contract parameters.
final
correlationId String?
A unique correlation ID for tracking the enrollment session.
final
enrollColors EnrollColors?
Custom colors used in the enrollment process UI.
final
enrollEnvironment EnrollEnvironment
The environment in which the enrollment will be performed (e.g., staging or production).
final
enrollForcedDocumentType EnrollForcedDocumentType?
The mode of the forced document type process (e.g., nationalIdOnly, passportOnly or nationalIdOrPassport).
final
enrollMode EnrollMode
The mode of the enrollment process (e.g., onboarding or authentication).
final
googleApiKey String?
The Google API key, used if required by the enrollment process.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
levelOfTrust String?
The level of trust for the applicant, used for authentication.
final
localizationCode EnrollLocalizations
The localization code specifying the language of the plugin (e.g., Arabic or English).
final
mainScreenContext BuildContext
The context of the main screen where the plugin is being used.
final
onError → dynamic Function(String error)
A callback function to execute when an error occurs during enrollment.
final
onGettingRequestId → dynamic Function(String requestId)
A callback function to execute when a request ID is received during the process.
final
onSuccess → dynamic Function(String applicantId)
A callback function to execute when the enrollment is successful.
final
requestId String?
The ID of the request, used for breaking the request.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipTutorial bool?
Determines whether to skip the tutorial during the enrollment process.
final
templateId String?
The ID of the contract template, used for sign contract.
final
tenantId String
The tenant ID for the organization using the enrollment process.
final
tenantSecret String
The tenant secret key used for authentication.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<EnrollPlugin>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited