mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 06:24:20 +01:00
Add Info data model for skill tree
The Info data model holds metadata about a skill node. It includes: - The difficulty level of the skill node - A description of the skill node - A list of potential side effects related to the skill node
This commit is contained in:
19
frontend/lib/models/skill_tree/info.dart
Normal file
19
frontend/lib/models/skill_tree/info.dart
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
class Info {
|
||||||
|
final String difficulty;
|
||||||
|
final String description;
|
||||||
|
final List<String> sideEffects;
|
||||||
|
|
||||||
|
Info({
|
||||||
|
required this.difficulty,
|
||||||
|
required this.description,
|
||||||
|
required this.sideEffects,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Info.fromJson(Map<String, dynamic> json) {
|
||||||
|
return Info(
|
||||||
|
difficulty: json['difficulty'],
|
||||||
|
description: json['description'],
|
||||||
|
sideEffects: List<String>.from(json['side_effects']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user