ReportTemplateInfo class
One catalog entry: XML plus the sample data, images, and fonts it needs.
Constructors
-
ReportTemplateInfo({required String id, required String title, required String titleAr, required String description, required String descriptionAr, required ReportTemplateCategory category, required bool rtl, required String xml, required Map<
String, Object?> sampleData(), String? family, Map<String, String> strings = const <String, String>{}, Map<String, Uint8List> images()?, String? familyTitle, String? familyTitleAr, int order = 0, Map<String, String> subreports = const <String, String>{}}) -
ReportTemplateInfo API.
const
- ReportTemplateInfo.decode(Uint8List bytes)
-
Reads a template
.qrep(ReportPackage.decode, then ReportTemplateInfo.fromPackage).factory - ReportTemplateInfo.fromPackage(ReportPackage package)
-
The template saved in
package, described by its ReportPackage.template manifest.
Properties
- category → ReportTemplateCategory
-
category API.
final
- description → String
-
English summary of layout and bindings.
final
- descriptionAr → String
-
Arabic summary.
final
- family → String
-
Shared id of the language versions (
sales_invoice).final - familyTitle → String
-
English title shared by the language versions (
VAT sales invoice).no setter - familyTitleAr → String
-
Arabic title shared by the language versions.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Stable identifier (
sales_invoice_ar).final - language → ReportTemplateLanguage
-
ReportTemplateLanguage.arabic for rtl templates.
no setter
- manifest → ReportTemplateManifest
-
Catalog details as saved in a template
.qrep.no setter - order → int
-
Position within its category; lower comes first.
final
- rtl → bool
-
Right-to-left layout (the Arabic version).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sampleData
→ Map<
String, Object?> Function() -
Data shaped like the bindings the template expects.
final
-
strings
→ Map<
String, String> -
Values for the
[[key]]tokens of the layout.final -
subreports
→ Map<
String, String> -
Child layouts stored at
subreports/<name>.xml.final - title → String
-
English title.
final
- titleAr → String
-
Arabic title.
final
- xml → String
-
.qreplayout XML with every[[key]]token filled from strings.no setter
Methods
-
descriptionFor(
{required bool arabic}) → String -
description or descriptionAr for
arabic. -
familyTitleFor(
{required bool arabic}) → String -
familyTitle or familyTitleAr for
arabic. -
images(
) → Map< String, Uint8List> -
Pictures saved with the report (logo, stamp, product photos, …),
keyed as the layout's
<Image source>expects. Empty when it has none. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
package(
) → ReportPackage -
Complete
.qreppackage: layout, images, fonts, sample data, and manifest. A template read from a file returns that file's package. -
titleFor(
{required bool arabic}) → String -
title or titleAr for
arabic. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
compare(
ReportTemplateInfo a, ReportTemplateInfo b) → int - Orders templates by category, then order, then family, Arabic before English.