SmileIDSmartSelfieAuthentication constructor

SmileIDSmartSelfieAuthentication({
  1. Key? key,
  2. String? userId,
  3. bool allowNewEnroll = false,
  4. bool allowAgentMode = false,
  5. bool showAttribution = true,
  6. bool showInstructions = true,
  7. Map<String, String>? extraPartnerParams,
  8. required dynamic onSuccess(
    1. String resultJson
    ),
  9. required dynamic onError(
    1. String errorMessage
    ),
})

Implementation

factory SmileIDSmartSelfieAuthentication({
  Key? key,
  // userId can't actually be null in the native SDK but we delegate their creation to
  // the native platform code, since that's where the random ID creation happens
  String? userId,
  bool allowNewEnroll = false,
  bool allowAgentMode = false,
  bool showAttribution = true,
  bool showInstructions = true,
  Map<String, String>? extraPartnerParams,
  required Function(String resultJson) onSuccess,
  required Function(String errorMessage) onError,
}) {
  return SmileIDSmartSelfieAuthentication._(
    onSuccess: onSuccess,
    onError: onError,
    creationParams: {
      "userId": userId,
      "allowNewEnroll": allowNewEnroll,
      "allowAgentMode": allowAgentMode,
      "showAttribution": showAttribution,
      "showInstructions": showInstructions,
      "extraPartnerParams" : extraPartnerParams,
    },
  );
}