ReportTemplate class
Report template - accepts any data class
Constructors
-
ReportTemplate({required String id, required String name, String? description, ReportType reportType = ReportType.label, double pageWidth = 210, double pageHeight = 297, PageFormat pageFormat = PageFormat.a4Portrait, double marginTop = 10, double marginBottom = 10, double marginLeft = 10, double marginRight = 10, int itemsPerRow = 4, int itemsPerColumn = 6, double horizontalGap = 2, double verticalGap = 2, double itemWidth = 40, double itemHeight = 45, List<
ReportElement> ? elements, String? dataSchemaName, DataSchema? dataSchema, DateTime? createdAt, DateTime? updatedAt}) -
ReportTemplate.fromJson(Map<
String, dynamic> json) -
factory
Properties
- createdAt ↔ DateTime
-
getter/setter pair
- dataSchema ↔ DataSchema?
-
getter/setter pair
- dataSchemaName ↔ String?
-
getter/setter pair
- description ↔ String?
-
getter/setter pair
-
elements
↔ List<
ReportElement> -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontalGap ↔ double
-
getter/setter pair
- id → String
-
final
- itemHeight ↔ double
-
getter/setter pair
- itemsPerColumn ↔ int
-
getter/setter pair
- itemsPerRow ↔ int
-
getter/setter pair
- itemWidth ↔ double
-
getter/setter pair
- marginBottom ↔ double
-
getter/setter pair
- marginLeft ↔ double
-
getter/setter pair
- marginRight ↔ double
-
getter/setter pair
- marginTop ↔ double
-
getter/setter pair
- name ↔ String
-
getter/setter pair
- pageFormat ↔ PageFormat
-
getter/setter pair
- pageHeight ↔ double
-
getter/setter pair
- pageWidth ↔ double
-
getter/setter pair
- reportType ↔ ReportType
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sortedElements
→ List<
ReportElement> -
no setter
- updatedAt ↔ DateTime
-
getter/setter pair
- verticalGap ↔ double
-
getter/setter pair
Methods
-
addElement(
ReportElement element) → void -
copyWith(
{String? id, String? name, String? description, ReportType? reportType, double? pageWidth, double? pageHeight, PageFormat? pageFormat, double? marginTop, double? marginBottom, double? marginLeft, double? marginRight, int? itemsPerRow, int? itemsPerColumn, double? horizontalGap, double? verticalGap, double? itemWidth, double? itemHeight, List< ReportElement> ? elements, String? dataSchemaName, DataSchema? dataSchema}) → ReportTemplate -
getAvailableFields(
) → List< String> - Lists all fields available in the schema
-
getElementById(
String elementId) → ReportElement? -
getFieldDefinition(
String fieldName) → FieldDefinition? - Returns the definition of a field
-
getSampleData(
) → Map< String, dynamic> - Returns the sample data of the schema
-
isValidField(
String fieldName) → bool - Whether a field is valid in the schema
-
loadSchemaByName(
String schemaName) → bool - Loads the schema from the registry by name
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeElement(
String elementId) → void -
setDataSchema(
DataSchema schema) → void - Sets the data schema
-
setPageFormat(
PageFormat format) → void -
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
updateElement(
ReportElement element) → void -
validateData(
List data) → ValidationResult - Validates a list of data against the template schema
-
validateSingleData(
dynamic data) → ValidationResult - Validates a single data item against the template schema
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited