SheetContent constructor

SheetContent({
  1. ScanbotColor? sheetColor,
  2. ScanbotColor? dividerColor,
  3. bool manualCountChangeEnabled = true,
  4. ScanbotColor? manualCountOutlineColor,
  5. ScanbotColor? manualCountChangeColor,
  6. StyledText? title,
  7. ButtonConfiguration? clearAllButton,
  8. StyledText? barcodeItemTitle,
  9. StyledText? barcodeItemSubtitle,
  10. bool barcodeItemImageVisible = true,
  11. ButtonConfiguration? submitButton,
  12. ButtonConfiguration? startScanningButton,
  13. StyledText? placeholderTitle,
  14. StyledText? placeholderSubtitle,
  15. ScanbotColor? placeholderIconBackground,
  16. IconStyle? placeholderIcon,
  17. SwipeToDelete? swipeToDelete,
})

Implementation

SheetContent({
  ScanbotColor? sheetColor,
  ScanbotColor? dividerColor,
  this.manualCountChangeEnabled = true,
  ScanbotColor? manualCountOutlineColor,
  ScanbotColor? manualCountChangeColor,
  StyledText? title,
  ButtonConfiguration? clearAllButton,
  StyledText? barcodeItemTitle,
  StyledText? barcodeItemSubtitle,
  this.barcodeItemImageVisible = true,
  ButtonConfiguration? submitButton,
  ButtonConfiguration? startScanningButton,
  StyledText? placeholderTitle,
  StyledText? placeholderSubtitle,
  ScanbotColor? placeholderIconBackground,
  IconStyle? placeholderIcon,
  SwipeToDelete? swipeToDelete,
})  : sheetColor = sheetColor ?? ScanbotColor("?sbColorSurface"),
      dividerColor = dividerColor ?? ScanbotColor("?sbColorOutline"),
      manualCountOutlineColor =
          manualCountOutlineColor ?? ScanbotColor("?sbColorOutline"),
      manualCountChangeColor =
          manualCountChangeColor ?? ScanbotColor("?sbColorPrimary"),
      title = title ??
          StyledText(
              text: "%d items", color: ScanbotColor("?sbColorOnSurface")),
      clearAllButton = clearAllButton ??
          ButtonConfiguration(
              visible: true,
              text: "Clear all",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 1.0),
              foreground: ForegroundStyle(
                  iconVisible: false,
                  color: ScanbotColor("?sbColorOnSurface"),
                  useShadow: false)),
      barcodeItemTitle = barcodeItemTitle ??
          StyledText(
              visible: true,
              text: "BARCODE_TITLE",
              color: ScanbotColor("?sbColorOnSurface"),
              useShadow: false),
      barcodeItemSubtitle = barcodeItemSubtitle ??
          StyledText(
              text: "BARCODE_SUBTITLE",
              color: ScanbotColor("?sbColorOnSurfaceVariant")),
      submitButton = submitButton ??
          ButtonConfiguration(
              visible: true,
              text: "Submit",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 1.0),
              foreground: ForegroundStyle(
                  iconVisible: false,
                  color: ScanbotColor("?sbColorOnSurface"),
                  useShadow: false)),
      startScanningButton = startScanningButton ??
          ButtonConfiguration(
              visible: true,
              text: "Start scanning",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("?sbColorPrimary"),
                  fillColor: ScanbotColor("?sbColorPrimary"),
                  strokeWidth: 1.0),
              foreground: ForegroundStyle(
                  iconVisible: true,
                  color: ScanbotColor("?sbColorOnPrimary"),
                  useShadow: false)),
      placeholderTitle = placeholderTitle ??
          StyledText(
              text: "No barcodes here!",
              color: ScanbotColor("?sbColorOnSurface")),
      placeholderSubtitle = placeholderSubtitle ??
          StyledText(
              text:
                  "The barcode list is currently empty. Close this sheet and scan your items to add them.",
              color: ScanbotColor("?sbColorOnSurfaceVariant")),
      placeholderIconBackground =
          placeholderIconBackground ?? ScanbotColor("?sbColorOutline"),
      placeholderIcon = placeholderIcon ??
          IconStyle(visible: true, color: ScanbotColor("?sbColorOnSurface")),
      swipeToDelete = swipeToDelete ??
          SwipeToDelete(
              enabled: true,
              backgroundColor: ScanbotColor("?sbColorNegative"),
              iconColor: ScanbotColor("?sbColorOnPrimary"));