Checkbox constructor

Checkbox({
  1. required bool value,
  2. bool tristate = false,
  3. PdfColor activeColor = PdfColors.blue,
  4. PdfColor checkColor = PdfColors.white,
  5. required String name,
  6. double width = 13,
  7. double height = 13,
  8. BoxDecoration? decoration,
  9. PdfIndirect? replaces,
})

Implementation

Checkbox({
  required this.value,
  this.tristate = false,
  this.activeColor = PdfColors.blue,
  this.checkColor = PdfColors.white,
  required this.name,
  double width = 13,
  double height = 13,
  BoxDecoration? decoration,
  this.replaces,
})  : radius = decoration?.shape == BoxShape.circle
          ? Radius.circular(math.max(height, width) / 2)
          : decoration?.borderRadius?.uniform ?? Radius.zero,
      super(
          child: Container(
              width: width,
              height: height,
              margin: const EdgeInsets.all(1),
              decoration: decoration ??
                  BoxDecoration(
                      border: Border.all(
                    color: PdfColors.grey600,
                    width: 2,
                  ))));