TitleElement class

An element representing the title of the KnowledgePanel which could consist of a text title, subtitle and an icon.

Inheritance

Constructors

TitleElement({required String? title, String? name, String? subtitle, double? value, String? valueString, Grade? grade, TitleElementType? type, String? iconUrl, bool? iconColorFromEvaluation})
const
TitleElement.fromJson(Map<String, dynamic> json)
factory

Properties

grade → Grade?
Grade of the panel, depicting the level of impact the product has for the corresponding topics. Client can choose to color code the panel depending on how good/bad the grade is. Scale: 'A' -> 'E'
final
hashCode → int
The hash code for this object.
no setterinherited
iconColorFromEvaluation → bool?
If true, the icon can be tinted with a color (red/green/yellow/whatever) in accordance with the panel evaluation, as per the client's discretion.
final
iconUrl → String?
URL of an icon representing the Panel.
final
name → String?
A short name of this panel, not including any actual values.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subtitle → String?
Subtitle of the panel. Example - 'High environmental impact'.
final
title → String?
Title string of the panel. Example - 'Eco-Score D'.
final
type → TitleElementType?
Type of the TitleElement.
final
value → double?
The value of the panel, for example the percentage of sugar for 100g in the product.
final
valueString → String?
The value of the panel as a string, this includes the unit, for instance 10%.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toData() → Map<String, String>
inherited
toJson() → Map<String, dynamic>
override
toString() → String
A string representation of this object.
inherited
toValueString() → String
Returns all values as a String separated by a hyphen value1 - value2 - value3
inherited

Operators

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