SmileIDSmartSelfieAuthenticationEnhanced constructor

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

Implementation

factory SmileIDSmartSelfieAuthenticationEnhanced({
  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 showAttribution = true,
  bool showInstructions = true,
  Map<String, String>? extraPartnerParams,
  required Function(String resultJson) onSuccess,
  required Function(String errorMessage) onError,
}) {
  return SmileIDSmartSelfieAuthenticationEnhanced._(
    onSuccess: onSuccess,
    onError: onError,
    creationParams: {
      "userId": userId,
      "allowNewEnroll": allowNewEnroll,
      "showAttribution": showAttribution,
      "showInstructions": showInstructions,
      "extraPartnerParams" : extraPartnerParams,
    },
  );
}