Skip to content

Commit

Permalink
feat: add new lottie push up
Browse files Browse the repository at this point in the history
  • Loading branch information
amaralkaff committed Nov 7, 2024
1 parent 92d4cd5 commit 1c2bb33
Show file tree
Hide file tree
Showing 34 changed files with 74 additions and 75 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

android {
namespace = "com.example.workout_ai"
namespace = "com.workout.ai"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

Expand All @@ -19,7 +19,7 @@ android {
}

defaultConfig {
applicationId = "com.example.workout_ai"
applicationId = "com.workout.ai"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="workout_ai"
android:label="Workout AI"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/launcher_icon">
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.workout_ai
package com.workout.ai

import io.flutter.embedding.android.FlutterActivity

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/push-up-animation.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions flutter_launcher_icons.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# flutter pub run flutter_launcher_icons
flutter_launcher_icons:
image_path: "assets/icon.png"

android: "launcher_icon"
# image_path_android: "assets/icon/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21
# adaptive_icon_background: "assets/icon/background.png"
# adaptive_icon_foreground: "assets/icon/foreground.png"

ios: true
ios: false
# image_path_ios: "assets/icon/icon.png"
remove_alpha_channel_ios: true
remove_alpha_channel_ios: false

web:
generate: true
Expand Down
4 changes: 2 additions & 2 deletions lib/blocs/user_profile_cubit.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/models/user_profile_state.dart';
import 'package:workout_ai/services/user_profile_service.dart';
import '../models/user_profile_state.dart';
import '../services/user_profile_service.dart';

class UserProfileCubit extends Cubit<UserProfileState> {
final UserProfileService _profileService;
Expand Down
20 changes: 10 additions & 10 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/models/auth_state.dart';
import 'package:workout_ai/models/exercise_completion_model.dart';
import 'package:workout_ai/models/exercise_stats_model.dart';
import 'package:workout_ai/models/push_up_model.dart';
import 'package:workout_ai/models/sit_up_model.dart';
import 'package:workout_ai/models/user_manager.dart';
import 'package:workout_ai/models/weight_manager.dart';
import 'package:workout_ai/services/auth_service.dart';
import 'package:workout_ai/views/auth/login_screen.dart';
import 'package:workout_ai/views/splash_screen.dart';
import '../models/auth_state.dart';
import '../models/exercise_completion_model.dart';
import '../models/exercise_stats_model.dart';
import '../models/push_up_model.dart';
import '../models/sit_up_model.dart';
import '../models/user_manager.dart';
import '../models/weight_manager.dart';
import '../services/auth_service.dart';
import '../views/auth/login_screen.dart';
import '../views/splash_screen.dart';

Future<void> main() async {
// Ensure Flutter is initialized
Expand Down
2 changes: 1 addition & 1 deletion lib/models/exercise_timer_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/models/exercise_completion_model.dart';
import '../models/exercise_completion_model.dart';

enum TimerStatus {
initial,
Expand Down
2 changes: 1 addition & 1 deletion lib/models/user_manager.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// lib/models/user_manager.dart

import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/models/user_info_model.dart';
import '../models/user_info_model.dart';

class UserManager extends Cubit<UserInfo?> {
UserManager() : super(null);
Expand Down
2 changes: 1 addition & 1 deletion lib/models/user_profile_state.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// lib/models/user_profile_state.dart
import 'package:workout_ai/models/user_profile_model.dart';
import '../models/user_profile_model.dart';

enum UserProfileStatus { loading, success, error }

Expand Down
2 changes: 1 addition & 1 deletion lib/services/api_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'dart:convert';
import 'dart:developer';
import 'package:http/http.dart' as http;
import 'package:workout_ai/services/auth_service.dart';
import '../services/auth_service.dart';

class APIService {
static const String baseUrl = 'https://backend-workout-ai.vercel.app/api';
Expand Down
4 changes: 2 additions & 2 deletions lib/services/auth_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import 'dart:convert';
import 'dart:developer';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:workout_ai/models/user_info_model.dart';
import 'package:workout_ai/services/api_service.dart';
import '../models/user_info_model.dart';
import '../services/api_service.dart';

class AuthService {
static String? _token;
Expand Down
4 changes: 2 additions & 2 deletions lib/services/progress_service.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:developer';

import 'package:workout_ai/models/progress_data.dart';
import 'package:workout_ai/services/api_service.dart';
import '../models/progress_data.dart';
import '../services/api_service.dart';

class ProgressService {
final APIService _api = APIService();
Expand Down
2 changes: 1 addition & 1 deletion lib/services/pushup_service.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'dart:developer';
import 'package:http/http.dart' as http;
import 'package:workout_ai/services/auth_service.dart';
import '../services/auth_service.dart';

class PushupService {
static const String baseUrl = 'https://backend-workout-ai.vercel.app/api';
Expand Down
2 changes: 1 addition & 1 deletion lib/services/situp_service.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'dart:developer';
import 'package:http/http.dart' as http;
import 'package:workout_ai/services/auth_service.dart';
import '../services/auth_service.dart';

class SitUpService {
static const String baseUrl = 'https://backend-workout-ai.vercel.app/api';
Expand Down
4 changes: 2 additions & 2 deletions lib/services/user_profile_service.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// lib/services/user_profile_service.dart
import 'dart:developer';

import 'package:workout_ai/models/user_profile_model.dart';
import 'package:workout_ai/services/api_service.dart';
import '../models/user_profile_model.dart';
import '../services/api_service.dart';

class UserProfileService {
final APIService _api = APIService();
Expand Down
2 changes: 1 addition & 1 deletion lib/services/workout_info_service.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// lib/services/workout_info_service.dart
import 'dart:developer';
import 'package:workout_ai/services/api_service.dart';
import '../services/api_service.dart';

class WorkoutInfoService {
final APIService _api = APIService();
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/services.dart';
import 'package:google_ml_kit/google_ml_kit.dart';
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
import 'package:workout_ai/models/push_up_model.dart';
import '../models/push_up_model.dart';

Future<String> getAssetPath(String asset) async {
final path = await getLocalPath(asset);
Expand Down
2 changes: 1 addition & 1 deletion lib/views/auth/login_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/views/splash_screen.dart';
import '../splash_screen.dart';
import '../../models/auth_state.dart';
import '../../models/user_manager.dart';
import '../../models/user_info_model.dart';
Expand Down
18 changes: 9 additions & 9 deletions lib/views/camera_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_ml_kit/google_ml_kit.dart';
import 'package:workout_ai/models/exercise_completion_model.dart';
import 'package:workout_ai/models/exercise_stats_model.dart';
import 'package:workout_ai/models/push_up_model.dart';
import 'package:workout_ai/models/sit_up_model.dart';
import 'package:workout_ai/painters/pose_painter.dart';
import 'package:workout_ai/services/pushup_service.dart';
import 'package:workout_ai/utils/sit_up_utils.dart';
import 'package:workout_ai/utils/utils.dart' as utils;
import 'package:workout_ai/widgets/workout_completion_dialog.dart';
import '../models/exercise_completion_model.dart';
import '../models/exercise_stats_model.dart';
import '../models/push_up_model.dart';
import '../models/sit_up_model.dart';
import '../painters/pose_painter.dart';
import '../services/pushup_service.dart';
import '../utils/sit_up_utils.dart';
import '../utils/utils.dart' as utils;
import '../widgets/workout_completion_dialog.dart';
import 'dart:developer' as developer;

class ExerciseStatsWidget extends StatelessWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/views/detector_view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:google_mlkit_commons/google_mlkit_commons.dart';
import 'package:workout_ai/painters/pose_painter.dart';
import '../painters/pose_painter.dart';

import 'camera_view.dart';
import 'gallery_view.dart';
Expand Down
22 changes: 11 additions & 11 deletions lib/views/splash_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:shimmer/shimmer.dart';
import 'package:workout_ai/models/auth_state.dart';
import 'package:workout_ai/models/user_manager.dart';
import 'package:workout_ai/models/user_profile_model.dart';
import 'package:workout_ai/services/auth_service.dart';
import 'package:workout_ai/services/user_profile_service.dart';
import 'package:workout_ai/services/workout_info_service.dart';
import 'package:workout_ai/views/auth/login_screen.dart';
import 'package:workout_ai/views/pose_detection_view.dart';
import 'package:workout_ai/views/sit_up_detector_view.dart';
import 'package:workout_ai/widgets/progress_tracker.dart';
import 'package:workout_ai/widgets/workout_card.dart';
import '../models/auth_state.dart';
import '../models/user_manager.dart';
import '../models/user_profile_model.dart';
import '../services/auth_service.dart';
import '../services/user_profile_service.dart';
import '../services/workout_info_service.dart';
import '../views/auth/login_screen.dart';
import '../views/pose_detection_view.dart';
import '../views/sit_up_detector_view.dart';
import '../widgets/progress_tracker.dart';
import '../widgets/workout_card.dart';

class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
Expand Down
6 changes: 3 additions & 3 deletions lib/widgets/progress_tracker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import 'dart:math' as math;
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';
import 'package:workout_ai/models/progress_data.dart' as progress;
import 'package:workout_ai/services/progress_service.dart';
import 'package:workout_ai/services/workout_info_service.dart';
import '../models/progress_data.dart' as progress;
import '../services/progress_service.dart';
import '../services/workout_info_service.dart';

enum ChartView { weight, calories }

Expand Down
8 changes: 4 additions & 4 deletions lib/widgets/situp_completion_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// lib/widgets/situp_completion_dialog.dart
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/models/exercise_completion_model.dart';
import 'package:workout_ai/models/exercise_stats_model.dart';
import 'package:workout_ai/services/situp_service.dart';
import 'package:workout_ai/views/splash_screen.dart';
import '../models/exercise_completion_model.dart';
import '../models/exercise_stats_model.dart';
import '../services/situp_service.dart';
import '../views/splash_screen.dart';

class SitUpCompletionDialog extends StatefulWidget {
final String exerciseType;
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/user_info_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/models/auth_state.dart';
import 'package:workout_ai/services/auth_service.dart';
import '../models/auth_state.dart';
import '../services/auth_service.dart';
import '../models/user_info_model.dart';
import '../models/user_manager.dart';
import 'dart:developer';
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/weight_confirmation_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/models/weight_manager.dart';
import '../models/weight_manager.dart';

class WeightConfirmationDialog extends StatefulWidget {
final int currentWeight;
Expand Down
10 changes: 5 additions & 5 deletions lib/widgets/workout_completion_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// lib/widgets/workout_completion_dialog.dart
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:workout_ai/models/exercise_completion_model.dart';
import 'package:workout_ai/models/exercise_stats_model.dart';
import 'package:workout_ai/services/pushup_service.dart';
import 'package:workout_ai/services/situp_service.dart';
import 'package:workout_ai/views/splash_screen.dart';
import '../models/exercise_completion_model.dart';
import '../models/exercise_stats_model.dart';
import '../services/pushup_service.dart';
import '../services/situp_service.dart';
import '../views/splash_screen.dart';

class WorkoutCompletionDialog extends StatefulWidget {
final String exerciseType;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: workout_ai
name: WorkoutAI
description: "AI-powered workout app featuring push-up counting with ML Kit and other exercise tracking capabilities"
publish_to: "none"
version: 1.0.0+1
Expand Down
4 changes: 2 additions & 2 deletions test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:workout_ai/main.dart';
import '../lib/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
Expand All @@ -12,4 +12,4 @@ void main() {
// You can write your tests here
expect(find.byType(MaterialApp), findsOneWidget);
});
}
}

0 comments on commit 1c2bb33

Please sign in to comment.