AnnotationProperties class
Typed representation of annotation properties.
Used by AnnotationManagerInterface.getAnnotationProperties and AnnotationManagerInterface.saveAnnotationProperties.
Constructors
- AnnotationProperties({String? annotationId, int? pageIndex, int? strokeColor, int? fillColor, double? opacity, double? lineWidth, String? flagsJson, String? customDataJson, String? contents, String? subject, String? creator, String? bboxJson, String? note, String? inkLinesJson, String? fontName, double? fontSize, String? iconName})
-
const
-
AnnotationProperties.fromJson(Map<
String, dynamic> json) -
Creates AnnotationProperties from a JSON map.
factory
Properties
- annotationId → String?
-
Unique annotation identifier.
final
-
bbox
→ List<
double> ? -
Available on AnnotationProperties, provided by the AnnotationPropertiesGetters extension
Gets the bounding box as a list of doublesx, y, width, height. Decodes from the internal JSON string representation.no setter - bboxJson → String?
-
JSON-encoded bounding box
{"x", "y", "width", "height"}.final - boundingBox → Rect?
-
Available on AnnotationProperties, provided by the AnnotationPropertiesGetters extension
Gets the bounding box as a Flutter Rect object. Decodes from the internal JSON string representation.no setter - color → Color?
-
Available on AnnotationProperties, provided by the AnnotationPropertiesGetters extension
Gets the stroke color as a Flutter Color object.no setter - contents → String?
-
Text content of the annotation.
final
- creator → String?
-
Creator/author of the annotation.
final
-
customData
→ Map<
String, Object?> ? -
Available on AnnotationProperties, provided by the AnnotationPropertiesGetters extension
Gets the custom data as a typed Map. Decodes from the internal JSON string representation.no setter - customDataJson → String?
-
JSON-encoded custom data dictionary.
final
- fillColor → int?
-
Fill colour as an ARGB integer.
final
- fillColorValue → Color?
-
Available on AnnotationProperties, provided by the AnnotationPropertiesGetters extension
Gets the fill color as a Flutter Color object.no setter -
flags
→ List<
String> ? -
Available on AnnotationProperties, provided by the AnnotationPropertiesGetters extension
Gets the flags as a list of strings. Decodes from the internal JSON string representation.no setter - flagsJson → String?
-
JSON-encoded annotation flags array.
final
-
flagsSet
→ Set<
AnnotationFlag> ? -
Available on AnnotationProperties, provided by the AnnotationPropertiesGetters extension
Gets the flags as a Set of AnnotationFlag enums. Decodes from the internal JSON string representation. Skips any flag names that don't match a valid AnnotationFlag value (e.g., Web SDK may return 'noPrint' which maps to the 'print' flag).no setter - fontName → String?
-
Font name for free-text annotations.
final
- fontSize → double?
-
Font size for free-text annotations.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconName → String?
-
Icon name for note/stamp annotations.
final
-
inkLines
→ List<
List< ?List< >double> > -
Available on AnnotationProperties, provided by the AnnotationPropertiesGetters extension
Gets the ink lines as a typed nested list. Decodes from the internal JSON string representation. Format: [[x, y, pressure, ...], ...]no setter - inkLinesJson → String?
-
JSON-encoded ink lines array.
final
- lineWidth → double?
-
Stroke/line width in PDF points.
final
- note → String?
-
Popup/review note text.
final
- opacity → double?
-
Opacity in the range 0.0–1.0.
final
- pageIndex → int?
-
Zero-based page index the annotation is on.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strokeColor → int?
-
Stroke colour as an ARGB integer (e.g.
0xFFFF0000for opaque red).final - subject → String?
-
Subject of the annotation.
final
Methods
-
copyWith(
{String? annotationId, int? pageIndex, int? strokeColor, int? fillColor, double? opacity, double? lineWidth, String? flagsJson, String? customDataJson, String? contents, String? subject, String? creator, String? bboxJson, String? note, String? inkLinesJson, String? fontName, double? fontSize, String? iconName}) → AnnotationProperties - Returns a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toInstantJsonOverrides(
) → Map< String, dynamic> - The changed visual properties as InstantJSON-shaped overrides.
-
toJson(
) → Map< String, dynamic> - Converts these properties to a JSON map, omitting null values.
-
toString(
) → String -
A string representation of this object.
override
-
withBoundingBox(
Rect bbox) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated bounding box. -
withColor(
Color color) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated stroke color. -
withContents(
String contents) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated contents. -
withCreator(
String creator) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated creator. -
withCustomData(
Map< String, Object?> customData) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated custom data. -
withFillColor(
Color color) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated fill color. -
withFlags(
Set< AnnotationFlag> flags) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated flags. -
withFont(
String fontName, double fontSize) → AnnotationProperties -
Available on AnnotationProperties, provided by the FreeTextAnnotationProperties extension
Creates a modified copy with updated font. -
withIcon(
NoteIcon iconName) → AnnotationProperties -
Available on AnnotationProperties, provided by the NoteAnnotationProperties extension
Creates a modified copy with updated icon. -
withInkLines(
List< List< lines) → AnnotationPropertiesOffset> > -
Available on AnnotationProperties, provided by the InkAnnotationProperties extension
Creates a modified copy with updated ink lines. Accepts a list of lines where each line is a list of Offset points. Points are converted tox, y, pressureformat with default pressure of 1.0. -
withLineWidth(
double lineWidth) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated line width. -
withNote(
String note) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated note. -
withOpacity(
double opacity) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated opacity. -
withRawInkLines(
List< List< inkLines) → AnnotationPropertiesList< >double> > -
Available on AnnotationProperties, provided by the InkAnnotationProperties extension
Creates a modified copy with updated raw ink lines. Accepts ink lines in the native format: [[x, y, pressure, ...], ...] -
withSubject(
String subject) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with updated subject. -
withUpdates(
{Color? color, Color? fillColor, double? opacity, double? lineWidth, Set< AnnotationFlag> ? flags, Map<String, Object?> ? customData, String? contents, String? subject, String? creator, Rect? boundingBox, String? note}) → AnnotationProperties -
Available on AnnotationProperties, provided by the AnnotationPropertiesModification extension
Creates a modified copy with multiple updates.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited