CustomComponent class
A model to hold custom component data.
- Annotations
-
- @JsonSerializable()
Constructors
- CustomComponent({required String id, String name = '', required ComponentData data, DateTime? createdAt, String? previewUrl, String blurhash = ''})
- Default constructor to create a new component.
-
CustomComponent.fromJson(Map<
String, dynamic> json) -
Factory constructor for creating a new instance of this class from
a JSON object.
factory
Properties
- blurhash → String
-
Blur-hash for the thumbnail preview.
final
- createdAt → DateTime
-
Date and time when the component was created.
final
- data → ComponentData
-
Node data of the component. This is the data that is used to render the
component.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the component.
final
- name → String
-
Name of the component.
final
- previewUrl → String?
-
The thumbnail URL for the component preview.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited
Methods
-
copyWith(
{String? id, String? name, ComponentData? data, bool? deleted, String? previewUrl, String? blurhash}) → CustomComponent - Duplicate this CustomComponent instance with the given data overrides.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map - Returns a serializable map representation of the object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited