import 'package:aitrainer_app/model/tutorial_step.dart'; enum TutorialEnum { basic, development, training } class Tutorial { late int tutorialId; late String name; List? steps; Tutorial.fromJson(Map json) { this.tutorialId = json['tutorialId']; this.name = json['name']; if (json['steps'] != null && json['steps'].length > 0) { steps = json['steps'].map((step) => TutorialStep.fromJson(step)).toList(); } } Map toJson() => {'tutorialId': this.tutorialId, 'name': this.name, 'steps': steps.toString()}; @override String toString() => this.toJson().toString(); }