48 lines
1.1 KiB
Dart
48 lines
1.1 KiB
Dart
import 'dart:ui';
|
|
|
|
import 'exercise_type.dart';
|
|
|
|
class WorkoutMenuTree {
|
|
int id;
|
|
int parent;
|
|
String name;
|
|
String imageName;
|
|
Color color;
|
|
double fontSize;
|
|
bool child;
|
|
int exerciseTypeId;
|
|
ExerciseType exerciseType;
|
|
bool base;
|
|
|
|
bool is1RM;
|
|
bool isEndurance;
|
|
bool selected = false;
|
|
bool executed = false;
|
|
String exerciseDetail;
|
|
String nameEnglish;
|
|
|
|
WorkoutMenuTree(this.id, this.parent, this.name, this.imageName, this.color, this.fontSize, this.child, this.exerciseTypeId,
|
|
this.exerciseType, this.base, this.is1RM, this.isEndurance, this.nameEnglish);
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
"id": id,
|
|
"parent": parent,
|
|
"name": name,
|
|
"imageName": imageName,
|
|
"color": color.toString(),
|
|
"fontSize": fontSize.toString(),
|
|
"child": child.toString(),
|
|
"exerciseTypeId": exerciseTypeId.toString(),
|
|
"base": base.toString(),
|
|
"is1RM": is1RM.toString(),
|
|
"isEndurance": isEndurance.toString(),
|
|
};
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return this.toJson().toString();
|
|
}
|
|
}
|