WT 1.1.26+4 radar chart 1

This commit is contained in:
Tibor Bossanyi (Freelancer)
2022-04-16 21:55:59 +02:00
parent 225172f950
commit e59e225582
10 changed files with 130 additions and 344 deletions
+14
View File
@@ -1,3 +1,5 @@
import 'package:aitrainer_app/util/string_extension.dart';
enum LoginType { email, fb, google, apple }
extension LoginTypeExt on LoginType {
@@ -112,3 +114,15 @@ extension ExerciseSaveTypeExt on ExerciseSaveType {
bool equalsTo(ExerciseSaveType type) => this.toString() == type.toString();
bool equalsStringTo(String type) => this.toStr() == type;
}
enum MuscleGroup { chest, biceps, triceps, back, shoulders, core, thigh, calf }
extension MuscleGroupExt on MuscleGroup {
String toStr() => this.toString().split(".").last;
String toText() => this.toString().split(".").last.capitalize();
bool equalsTo(MuscleGroup type) => this.toString() == type.toString();
bool equalsStringTo(String type) => this.toStr() == type;
String getStrByIndex(int index) => MuscleGroup.values.elementAt(index).toStr();
MuscleGroup getByIndex(int index) => MuscleGroup.values.elementAt(index);
String getTextByIndex(int index) => MuscleGroup.values.elementAt(index).toText();
}
+5
View File
@@ -0,0 +1,5 @@
extension StringExtension on String {
String capitalize() {
return "${this[0].toUpperCase()}${this.substring(1).toLowerCase()}";
}
}