OcrWatermark class

Configurable watermark to display below the document image.

Pass a list of key-value pairs that will be rendered as watermark text. Example:

OcrWatermark(
  lines: {
    'Lead ID': 'LD-20250101-001',
    'Lat': '12.9716',
    'Long': '77.5946',
    'Agent': 'Ram Kumar',
    'Date': '2025-01-15 10:30',
  },
)

Constructors

OcrWatermark({required Map<String, String> lines, Color textColor = const Color(0xCCFFFFFF), Color backgroundColor = const Color(0xB3000000), double fontSize = 12, EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8)})
const

Properties

backgroundColor → Color
Background color behind the watermark. Defaults to black with 70% opacity.
final
fontSize → double
Font size for the viewer widget. Defaults to 12. For the downloaded image, font size is auto-scaled to the image resolution.
final
hashCode → int
The hash code for this object.
no setteroverride
lines → Map<String, String>
Key-value pairs to display as watermark lines.
final
padding → EdgeInsets
Padding inside the watermark area.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textColor → Color
Text color. Defaults to white with 80% opacity.
final

Methods

copyWith({Map<String, String>? lines, Color? textColor, Color? backgroundColor, double? fontSize, EdgeInsets? padding}) → OcrWatermark
Creates a copy with optional new values.
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