CameraPermissionScreen constructor

CameraPermissionScreen({
  1. StatusBarMode statusBarMode = StatusBarMode.DARK,
  2. ScanbotColor? background,
  3. ScanbotColor? iconBackground,
  4. IconStyle? icon,
  5. ButtonConfiguration? enableCameraButton,
  6. ButtonConfiguration? closeButton,
  7. StyledText? enableCameraTitle,
  8. StyledText? enableCameraExplanation,
})

Implementation

CameraPermissionScreen({
  this.statusBarMode = StatusBarMode.DARK,
  ScanbotColor? background,
  ScanbotColor? iconBackground,
  IconStyle? icon,
  ButtonConfiguration? enableCameraButton,
  ButtonConfiguration? closeButton,
  StyledText? enableCameraTitle,
  StyledText? enableCameraExplanation,
})  : background = background ?? ScanbotColor("?sbColorSurface"),
      iconBackground = iconBackground ?? ScanbotColor("?sbColorOutline"),
      icon = icon ??
          IconStyle(visible: true, color: ScanbotColor("?sbColorOnSurface")),
      enableCameraButton = enableCameraButton ??
          ButtonConfiguration(
              text: "Grant permission",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("?sbColorPrimary"),
                  fillColor: ScanbotColor("?sbColorPrimary"),
                  strokeWidth: 0.0),
              foreground: ForegroundStyle(
                  iconVisible: false,
                  color: ScanbotColor("?sbColorOnPrimary"),
                  useShadow: false)),
      closeButton = closeButton ??
          ButtonConfiguration(
              text: "Close",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 0.0),
              foreground: ForegroundStyle(
                  iconVisible: false,
                  color: ScanbotColor("?sbColorPrimary"),
                  useShadow: false)),
      enableCameraTitle = enableCameraTitle ??
          StyledText(
              text: "Camera permission denied!",
              color: ScanbotColor("?sbColorOnSurface")),
      enableCameraExplanation = enableCameraExplanation ??
          StyledText(
              text:
                  "Please allow the usage of the camera to start the scanning process.",
              color: ScanbotColor("?sbColorOnSurfaceVariant"));