fromString static method

AnnotationFlag? fromString(
  1. String value
)

Creates an AnnotationFlag from a string value.

Implementation

static AnnotationFlag? fromString(String value) {
  switch (value) {
    case 'invisible':
      return AnnotationFlag.invisible;
    case 'hidden':
      return AnnotationFlag.hidden;
    case 'print':
      return AnnotationFlag.print;
    case 'noZoom':
      return AnnotationFlag.noZoom;
    case 'noRotate':
      return AnnotationFlag.noRotate;
    case 'noView':
      return AnnotationFlag.noView;
    case 'readOnly':
      return AnnotationFlag.readOnly;
    case 'locked':
      return AnnotationFlag.locked;
    case 'toggleNoView':
      return AnnotationFlag.toggleNoView;
    case 'lockedContents':
      return AnnotationFlag.lockedContents;
    default:
      return null;
  }
}