UserConsentView

public struct UserConsentView
extension UserConsentView: View
extension UserConsentView: _ViewEmptyChecking

UserConsentView is used to display a series of user consent screens modally during the process of onboarding.

Usage

UserConsentView {
    UserConsentForm(userConsentPages: {
                   UserConsentPage {
                       Text("Form 0 Page 0")
                   } bodyText: {
                       Text("detailText")
                   } action: {
                       Button {
                       } label: {
                           Text("Learn more about privacy")
                       }
                   }
                   UserConsentPage {
                       Text("Form 0 Page 1")
                   } bodyText: {
                       Text("detailText")
                   } action: {
                       Button {
                       } label: {
                           Text("Learn more about privacy")
                       }
                   }
               },
               didAllow: { print("UserConsentForm - didAllow") }
    )
    UserConsentForm(userConsentPages: {
                   UserConsentPage {
                       Text("Form 1 Page 0")
                   } bodyText: {
                       Text("detailText")
                   } action: {
                       Button {
                       } label: {
                        Text("Learn more about Data Privacy")
                       }
                    }
                },
                isRequired: false,
                didAllow: { print("UserConsentForm - didAllow") })
} didAllow: {
    print("UserConsentView - didAllow: index: \($0)")
} didDeny: {
    print("UserConsentView - didDeny: index: \($0), isRequired: \($1)")
} didCancel: { _ in
    print("UserConsentView - didCancel")
} didFinish: { _ in
    presentationMode.wrappedValue.dismiss()
}