style property

PdfCheckBoxStyle get style

Gets or sets the style.

The default style is check.

Implementation

PdfCheckBoxStyle get style =>
    _checkBaseHelper.isLoadedField ? _checkBaseHelper._obtainStyle() : _style;
set style (PdfCheckBoxStyle value)

Implementation

set style(PdfCheckBoxStyle value) {
  if (_checkBaseHelper.isLoadedField) {
    _checkBaseHelper.assignStyle(value);
    if (this is PdfCheckBoxField &&
        (this as PdfCheckBoxField).items != null) {
      final PdfFieldItemCollection items = (this as PdfCheckBoxField).items!;
      for (int i = 0; i < items.count; i++) {
        PdfCheckBoxItemHelper.setStyle(items[i] as PdfCheckBoxItem, value);
      }
    }
    if (PdfFormHelper.getHelper(form!).needAppearances == false) {
      _checkBaseHelper.changed = true;
      _checkBaseHelper.fieldChanged = true;
    }
  } else {
    if (_style != value) {
      _style = value;
      WidgetAnnotationHelper.getHelper(_checkBaseHelper.widget!)
          .widgetAppearance!
          .normalCaption = _checkBaseHelper.styleToString(_style);
    }
  }
}