PrintTemplate class

A label, sign or report template, kept by the PrintStore.

design is the drag-and-drop layout edited in the designer: one label, one sign or one report page, measured in millimetres. paperFormatId says how many of them fit on the printed page. settings holds options the app owns for this template (e.g. how it formats its data): the library stores them with the template and never reads them.

Constructors

PrintTemplate({required String id, required String name, String? categoryId, required String paperFormatId, required ReportTemplate design, Map<String, dynamic> settings = const {}})
const

Properties

categoryId → String?
final
design → ReportTemplate
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
name → String
final
paperFormatId → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
settings → Map<String, dynamic>
final

Methods

copyWith({String? id, String? name, String? categoryId, bool clearCategory = false, String? paperFormatId, ReportTemplate? design, Map<String, dynamic>? settings}) → PrintTemplate
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toItem() → PrintStoreItem
toString() → String
A string representation of this object.
inherited
withSetting(String key, dynamic value) → PrintTemplate
The template with key set to value in its settings.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

newId() → String
tryFromItem(PrintStoreItem item) → PrintTemplate?
Returns null when the stored entry cannot be read, so a corrupted or future entry is skipped instead of breaking the template list.