OnboardingScanView

public struct OnboardingScanView
extension OnboardingScanView: View
extension OnboardingScanView: _ViewEmptyChecking

OnboardingScanView is used to display a scanner view to scan a QR code for app activation. It is also displaying the image thumbnails from camera roll and a button to start photo picker that user may choose the QR code image directly. Typically it is used in ActivationScreen and WelcomeScreen

Usage

@State var isScanPresented = false
ActivationScreen(title: "Activation",
    descriptionText: "If you received a welcome email, follow the activation link in the email.Otherwise, enter your email address or scan the QR code to start onboarding.",
    footnote: "Or",
    action: FioriButton(title: "Use your email", action: { _ in
        print("ActivationScreen Primary button clicked, email: \(self.inputText)")
    }),
    secondaryAction: FioriButton(title: "Scan", action: { _ in
        self.isScanPresented.toggle()
    }),
   illustratedMessage: IllustratedMessage(detailImage: {
   Image("IllustrationImage").resizable(resizingMode: .stretch)
}, title: {
   Text("Activation")
}, description: {
   Text("If you received a welcome email, follow the activation link in the email.Otherwise, enter your email address or scan the QR code to start onboarding.")
       .padding(EdgeInsets(top: 10, leading: 0, bottom: 0, trailing: 0))
}, detailImageSize: .large),
  inputText: self.$inputText,
  showsIllustratedMessage: self.showsIllustratedMessage)
  .sheet(isPresented: $isScanPresented) {
        OnboardingScanView(shouldValidateScanResult: { scanResult in
            return scanResult == "success"
        }, didCancel: {
            self.isScanPresented.toggle()
        }, usesCameraOnly: false,
           didTapContinue: {
            self.isScanPresented.toggle()
        })
}