Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Enhance SkillTreeNode Model to Include Additional Attributes

hunteraraujo30934f400a05
diff --git a/frontend/lib/models/skill_tree/skill_tree_node.dart b/frontend/lib/models/skill_tree/skill_tree_node.dart
index 6b94995c35..5d007739c8 100644
--- a/frontend/lib/models/skill_tree/skill_tree_node.dart
+++ b/frontend/lib/models/skill_tree/skill_tree_node.dart
@@ -1,18 +1,27 @@
import 'package:auto_gpt_flutter_client/models/skill_tree/skill_node_data.dart';
-// TODO: Update this with actual data
class SkillTreeNode {
final String color;
- final int id;
+ final SkillNodeData data;
+ final String id;
+ final String label;
+ final String shape;
- // final SkillNodeData data;
-
- SkillTreeNode({required this.color, required this.id});
+ SkillTreeNode({
+ required this.color,
+ required this.data,
+ required this.id,
+ required this.label,
+ required this.shape,
+ });
factory SkillTreeNode.fromJson(Map<String, dynamic> json) {
return SkillTreeNode(
- color: json['color'],
- id: json['id'],
+ color: json['color'] ?? "",
+ data: SkillNodeData.fromJson(json['data'] ?? {}),
+ id: json['id'] ?? "",
+ label: json['label'] ?? "",
+ shape: json['shape'] ?? "",
);
}
}