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? subtitle, 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 evaluation of the knowledge panel as per the client's discretion.
final
iconUrl String?
URL of an icon representing the Panel.
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

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