Skip to content

Offline gym log for Android. No account, no ads, no internet.

Add sports to the exercise catalog

InlitXf7a2620ae19a
diff --git a/lib/catalog/exercise_catalog.dart b/lib/catalog/exercise_catalog.dart
index 36eeaf1..43224ac 100644
--- a/lib/catalog/exercise_catalog.dart
+++ b/lib/catalog/exercise_catalog.dart
@@ -6431,6 +6431,269 @@ const List<Exercise> kExercises = [
'Log the total distance and the time you spent swimming.',
],
),
+ Exercise(
+ id: 'football',
+ name: 'Football',
+ primary: 'quads',
+ secondary: ['hamstrings', 'calves', 'glutes'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ aliases: ['Soccer'],
+ steps: [
+ 'Warm up with easy jogging and a few sprints.',
+ 'Log the minutes you played, not the time at the pitch.',
+ 'Add the distance if your watch tracked it.',
+ ],
+ ),
+ Exercise(
+ id: 'basketball',
+ name: 'Basketball',
+ primary: 'quads',
+ secondary: ['calves', 'glutes', 'shoulders'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Warm up your ankles and do a few jumps first.',
+ 'Log the minutes you were on the court.',
+ 'Count shooting practice as a separate, easier session.',
+ ],
+ ),
+ Exercise(
+ id: 'volleyball',
+ name: 'Volleyball',
+ primary: 'quads',
+ secondary: ['calves', 'shoulders'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Warm up your shoulders and do a few jumps first.',
+ 'Log the minutes of play.',
+ 'Beach volleyball counts too: the sand makes it harder.',
+ ],
+ ),
+ Exercise(
+ id: 'tennis',
+ name: 'Tennis',
+ primary: 'shoulders',
+ secondary: ['quads', 'calves', 'obliques'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Warm up your shoulder and wrist before the first serve.',
+ 'Log the minutes you played.',
+ 'Rallies count; long breaks between sets do not.',
+ ],
+ ),
+ Exercise(
+ id: 'padel',
+ name: 'Padel',
+ primary: 'shoulders',
+ secondary: ['quads', 'calves', 'obliques'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ aliases: ['Paddle'],
+ steps: [
+ 'Warm up your shoulder, wrist and ankles.',
+ 'Log the minutes of play.',
+ 'Doubles or singles, it all counts.',
+ ],
+ ),
+ Exercise(
+ id: 'badminton',
+ name: 'Badminton',
+ primary: 'shoulders',
+ secondary: ['quads', 'calves'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Warm up your shoulder and do a few lunges.',
+ 'Log the minutes of play.',
+ 'Short, fast rallies make it real cardio.',
+ ],
+ ),
+ Exercise(
+ id: 'squash',
+ name: 'Squash',
+ primary: 'quads',
+ secondary: ['shoulders', 'calves', 'glutes'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Warm up well: squash is fast from the first point.',
+ 'Log the minutes you played.',
+ 'Drink water between games.',
+ ],
+ ),
+ Exercise(
+ id: 'table-tennis',
+ name: 'Table Tennis',
+ primary: 'shoulders',
+ secondary: ['forearm', 'calves'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ aliases: ['Ping Pong'],
+ steps: [
+ 'Loosen your wrist and shoulder first.',
+ 'Log the minutes of play.',
+ 'Stay on the balls of your feet between shots.',
+ ],
+ ),
+ Exercise(
+ id: 'handball',
+ name: 'Handball',
+ primary: 'shoulders',
+ secondary: ['quads', 'calves', 'chest'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Warm up your throwing shoulder and do a few sprints.',
+ 'Log the minutes you played.',
+ 'Add the distance if your watch tracked it.',
+ ],
+ ),
+ Exercise(
+ id: 'rugby',
+ name: 'Rugby',
+ primary: 'quads',
+ secondary: ['shoulders', 'back', 'glutes'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Warm up with jogging, sprints and shoulder mobility.',
+ 'Log the minutes you played or trained.',
+ 'Contact days are hard on recovery: plan an easier gym day after.',
+ ],
+ ),
+ Exercise(
+ id: 'boxing',
+ name: 'Boxing',
+ primary: 'shoulders',
+ secondary: ['triceps', 'abdomen', 'calves'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ aliases: ['Kickboxing'],
+ steps: [
+ 'Warm up with jump rope and shadow boxing.',
+ 'Log the minutes of rounds and bag work.',
+ 'Keep your hands up and breathe out on each punch.',
+ ],
+ ),
+ Exercise(
+ id: 'martial-arts',
+ name: 'Martial Arts',
+ primary: 'quads',
+ secondary: ['shoulders', 'abdomen', 'glutes'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ aliases: ['Judo', 'Karate', 'BJJ', 'Taekwondo', 'MMA'],
+ steps: [
+ 'Warm up your hips, shoulders and neck.',
+ 'Log the minutes of class or sparring.',
+ 'Rolling and sparring count; long talks between drills do not.',
+ ],
+ ),
+ Exercise(
+ id: 'climbing',
+ name: 'Climbing',
+ primary: 'back',
+ secondary: ['biceps', 'forearm', 'shoulders'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ aliases: ['Bouldering'],
+ steps: [
+ 'Warm up on easy routes first.',
+ 'Log the minutes you spent climbing.',
+ 'Rest your fingers: hard climbing days stress the same muscles as pulling in the gym.',
+ ],
+ ),
+ Exercise(
+ id: 'skiing',
+ name: 'Skiing',
+ primary: 'quads',
+ secondary: ['glutes', 'calves', 'abdomen'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ aliases: ['Snowboarding'],
+ steps: [
+ 'Warm up your legs and hips before the first run.',
+ 'Log the minutes you were actually skiing.',
+ 'Add the distance if your watch tracked it.',
+ ],
+ ),
+ Exercise(
+ id: 'surfing',
+ name: 'Surfing',
+ primary: 'back',
+ secondary: ['shoulders', 'abdomen'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Warm up your shoulders before you paddle out.',
+ 'Log the minutes you were in the water.',
+ 'Paddling is most of the work: it trains your back and shoulders.',
+ ],
+ ),
+ Exercise(
+ id: 'dance',
+ name: 'Dance',
+ primary: 'calves',
+ secondary: ['quads', 'glutes', 'abdomen'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ aliases: ['Zumba'],
+ steps: [
+ 'Start with a few easy songs to warm up.',
+ 'Log the minutes you danced.',
+ 'Classes and nights out both count.',
+ ],
+ ),
+ Exercise(
+ id: 'golf',
+ name: 'Golf',
+ primary: 'obliques',
+ secondary: ['shoulders', 'forearm'],
+ equipment: 'Other',
+ difficulty: 'Beginner',
+ art: '',
+ kind: 'sport',
+ steps: [
+ 'Loosen your back and hips before the first swing.',
+ 'Log the minutes you played.',
+ 'Walking the course adds a lot: add the distance if you tracked it.',
+ ],
+ ),
Exercise(
id: 'leg-extension',
name: 'Leg Extension',
@@ -7232,6 +7495,26 @@ const Set<String> kStretchIds = {
const Set<String> kCalisthenicsEquipment = {'Bodyweight', 'Rings', 'Weighted'};
+const Map<String, String> kSportIcons = {
+ 'football': 'soccerBall',
+ 'basketball': 'basketball',
+ 'volleyball': 'volleyball',
+ 'tennis': 'tennisBall',
+ 'padel': 'racquet',
+ 'badminton': 'racquet',
+ 'squash': 'racquet',
+ 'table-tennis': 'pingPong',
+ 'handball': 'personSimpleThrow',
+ 'rugby': 'football',
+ 'boxing': 'boxingGlove',
+ 'martial-arts': 'handFist',
+ 'climbing': 'mountains',
+ 'skiing': 'personSimpleSki',
+ 'surfing': 'waves',
+ 'dance': 'musicNotes',
+ 'golf': 'golf',
+};
+
const Set<String> kCardioExtras = {
'jump-rope', 'battle-ropes', 'burpee', 'half-burpee', 'mountain-climber', 'high-knees', 'jumping-jack',
'skater-hop', 'squat-thrust', 'sprawl', 'lateral-shuffle', 'plank-jack',
@@ -7304,6 +7587,23 @@ const Map<String, String> kExerciseModes = {
'outdoor-walk': 'cardio',
'outdoor-hike': 'cardio',
'swim': 'cardio',
+ 'football': 'cardio',
+ 'basketball': 'cardio',
+ 'volleyball': 'cardio',
+ 'tennis': 'cardio',
+ 'padel': 'cardio',
+ 'badminton': 'cardio',
+ 'squash': 'cardio',
+ 'table-tennis': 'cardio',
+ 'handball': 'cardio',
+ 'rugby': 'cardio',
+ 'boxing': 'cardio',
+ 'martial-arts': 'cardio',
+ 'climbing': 'cardio',
+ 'skiing': 'cardio',
+ 'surfing': 'cardio',
+ 'dance': 'cardio',
+ 'golf': 'cardio',
'arch-hang': 'time',
'parallel-bar-support-hold': 'time',
};
diff --git a/lib/models/exercise.dart b/lib/models/exercise.dart
index c004329..344ceb7 100644
--- a/lib/models/exercise.dart
+++ b/lib/models/exercise.dart
@@ -87,7 +87,7 @@ class Exercise {
const List<String> kExerciseModeIds = ['cardio', 'time'];
-const List<String> kExerciseKinds = ['strength', 'calisthenics', 'cardio', 'stretch'];
+const List<String> kExerciseKinds = ['strength', 'calisthenics', 'cardio', 'stretch', 'sport'];
class ToolMeta {
const ToolMeta(this.id, this.name, this.desc);