PdfCustomStamp class

A reusable rubber stamp: visual template plus optional app metadata.

Custom stamps are saved on the local device through PdfEditingPreferences.customStamps, so they survive app restarts and are shared across documents. Host apps can also supply non-persisted stamps through PdfEditingController.providedCustomStamps or the editor shell's custom-stamps parameter. The stamp tool places the PdfEditingController.activeStamp with a tap; with none active it falls back to the classic flow (drag a box, type the caption).

Serializes to JSON so PdfEditingPreferences can persist it.

Constructors

PdfCustomStamp({required String text, required int color, PdfStampTemplate? template, String? type, List<String> tags = const []})
const

Properties

color int
RGB border and caption color.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags List<String>
App-defined labels for filtering, grouping, or reporting stamps.
final
template PdfStampTemplate?
Editable vector template for newer stamps. Null means this is a legacy text-only stamp and should be rendered with the classic appearance.
final
text String
The caption drawn inside the stamp's rounded border.
final
type String?
App-defined stamp kind, e.g. "Approval", "Audit", or "Tested".
final

Methods

encode() String
hasTag(String tag) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

decode(String json) PdfCustomStamp?
Parses encode's output; null for anything malformed.