@@ -95,6 +95,9 @@ class ComponentData with EquatableMixin, SerializableMixin {
9595 /// instance.
9696 final Map <String , dynamic > nodes;
9797
98+ /// Node ID -> variables.
99+ final Map <String , Set <VariableData >> variables;
100+
98101 /// Returns containing rect of the component.
99102 RectC get rect => RectC .fromLTWH (0 , 0 , width, height);
100103
@@ -103,11 +106,12 @@ class ComponentData with EquatableMixin, SerializableMixin {
103106 required this .width,
104107 required this .height,
105108 required this .nodes,
109+ this .variables = const {},
106110 }) : assert (nodes.isNotEmpty),
107111 assert (width > 0 && height > 0 );
108112
109113 @override
110- List <Object ?> get props => [width, height, nodes];
114+ List <Object ?> get props => [width, height, nodes, variables ];
111115
112116 @override
113117 Map toJson () => _$ComponentDataToJson (this );
@@ -122,10 +126,12 @@ class ComponentData with EquatableMixin, SerializableMixin {
122126 double ? width,
123127 double ? height,
124128 Map <String , dynamic >? nodes,
129+ Map <String , Set <VariableData >>? variables,
125130 }) =>
126131 ComponentData (
127132 width: width ?? this .width,
128133 height: height ?? this .height,
129134 nodes: nodes ?? this .nodes,
135+ variables: variables ?? this .variables,
130136 );
131137}
0 commit comments