WT 1.1.26+4 radar chart 1
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
extension StringExtension on String {
|
||||
String capitalize() {
|
||||
return "${this[0].toUpperCase()}${this.substring(1).toLowerCase()}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user