diff --git a/i18n/en.json b/i18n/en.json index da29c29..469684c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -507,5 +507,6 @@ "Register": "Sign Up", "Reach all basic functions, suggestions and": "Reach all basic functions, suggestions and", "optimized training plans, customized to your fitness state and strength:": "optimized training plans, customized to your fitness state and strength:", - "Soon! Check back later for the plan details": "Soon! Check back later for the plan details" + "Soon! Check back later for the plan details": "Soon! Check back later for the plan details", + "mins": "mins" } \ No newline at end of file diff --git a/i18n/hu.json b/i18n/hu.json index f545c61..6ed6cad 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -505,5 +505,6 @@ "Register": "Regisztráció", "Reach all basic functions, suggestions and": "Kattints a regisztrációra, hogy elérd az alap funkciókat, javaslatokat,", "optimized training plans, customized to your fitness state and strength:": "optiomalizált edzés terveket, amelyeket a te erő- és fitnesz állapododra szabunk:", - "Soon! Check back later for the plan details": "Nemsokára! Nézz vissza később, amikor már aktiváltuk az edzésterv részleteit" + "Soon! Check back later for the plan details": "Nemsokára! Nézz vissza később, amikor már aktiváltuk az edzésterv részleteit", + "mins": "perc" } \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 448db08..ee3c6d6 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -388,7 +388,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -531,7 +531,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -566,7 +566,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/bloc/training_evaluation/training_evaluation_bloc.dart b/lib/bloc/training_evaluation/training_evaluation_bloc.dart index ee19179..1dcfb51 100644 --- a/lib/bloc/training_evaluation/training_evaluation_bloc.dart +++ b/lib/bloc/training_evaluation/training_evaluation_bloc.dart @@ -58,13 +58,13 @@ class TrainingEvaluationBloc extends Bloc main() async { print(" -- FireBase init.."); await FirebaseApi().initializeFlutterFire(); - FlurryData.logEvent("enter_test"); runApp(MultiBlocProvider( providers: [ diff --git a/lib/repository/training_plan_repository.dart b/lib/repository/training_plan_repository.dart index 0cd52ea..975efa9 100644 --- a/lib/repository/training_plan_repository.dart +++ b/lib/repository/training_plan_repository.dart @@ -160,13 +160,17 @@ class TrainingPlanRepository { return detail; } - double oneRepMax = Common.calculate1RM(lastExercise1RM!.unitQuantity!, lastExercise1RM!.quantity!); + //double oneRepMax = Common.calculate1RM(lastExercise1RM!.unitQuantity!, lastExercise1RM!.quantity!); //print("Exercise $exerciseTypeId - 1RM : $oneRepMax"); - weight = oneRepMax * Common.get1RMPercent(detail.repeats!); + //weight = oneRepMax * Common.get1RMPercent(detail.repeats!); //print("Exercise $exerciseTypeId - weight : $weight"); + //weight = Common.roundWeight(weight); + //detail.weight = Common.calculateWeigthByChangedQuantity(detail.weight!, detail.repeats!.toDouble(), lastExercise1RM!.quantity!); + weight = lastExercise1RM!.unitQuantity! * detail.repeats! / lastExercise1RM!.quantity!; weight = Common.roundWeight(weight); + print("Recaluclated weight ${detail.weight} - repeat: ${detail.repeats}"); - detail.repeats = Common.calculateQuantityByChangedWeight(oneRepMax, weight, detail.repeats!.toDouble()); + //detail.repeats = Common.calculateQuantityByChangedWeight(oneRepMax, weight, detail.repeats!.toDouble()); detail.weight = weight; return detail; diff --git a/lib/view/training_evaluation_page.dart b/lib/view/training_evaluation_page.dart index f877126..322ffda 100644 --- a/lib/view/training_evaluation_page.dart +++ b/lib/view/training_evaluation_page.dart @@ -87,8 +87,8 @@ class TrainingEvaluationPage extends StatelessWidget with Trans { SliverAppBar( pinned: true, backgroundColor: Colors.transparent, - expandedHeight: 100.0, - collapsedHeight: 100, + expandedHeight: 130.0, + collapsedHeight: 130, toolbarHeight: 40, automaticallyImplyLeading: false, flexibleSpace: FlexibleSpaceBar( @@ -302,6 +302,7 @@ class ExerciseTile extends StatelessWidget with Trans { setContext(context); bool hasWeight = exercise.type.equalsTo(TrainingEvaluationExerciseType.weightBased); bool skipped = exercise.state.equalsTo(ExercisePlanDetailState.skipped); + bool extra = exercise.state.equalsTo(ExercisePlanDetailState.extra); return Container( color: Colors.transparent, @@ -367,15 +368,18 @@ class ExerciseTile extends StatelessWidget with Trans { TextSpan(text: "\n"), hasWeight ? skipped - ? TextSpan( - text: t("skipped") + "!", - style: GoogleFonts.inter(fontSize: 12, color: Colors.grey[400], fontWeight: FontWeight.bold)) + ? extra + ? TextSpan( + text: "-", style: GoogleFonts.inter(fontSize: 12, color: Colors.grey[400], fontWeight: FontWeight.bold)) + : TextSpan( + text: t("skipped") + "!", + style: GoogleFonts.inter(fontSize: 12, color: Colors.grey[400], fontWeight: FontWeight.bold)) : TextSpan( text: t("One Rep Max") + ": ", style: GoogleFonts.inter(fontSize: 12, color: Colors.yellow[400], fontWeight: FontWeight.bold)) : TextSpan(), hasWeight - ? skipped + ? skipped || extra ? TextSpan() : TextSpan( text: exercise.oneRepMax!.toStringAsFixed(0) + @@ -390,14 +394,14 @@ class ExerciseTile extends StatelessWidget with Trans { : TextSpan(), TextSpan(text: "\n"), hasWeight - ? skipped + ? skipped || extra ? TextSpan() : TextSpan( text: t("Total Lift") + ": ", style: GoogleFonts.inter(fontSize: 12, color: Colors.yellow[400], fontWeight: FontWeight.bold)) : TextSpan(), hasWeight - ? skipped + ? skipped || extra ? TextSpan() : TextSpan( text: exercise.totalLift!.toStringAsFixed(0) + @@ -409,7 +413,7 @@ class ExerciseTile extends StatelessWidget with Trans { t("kg") + ")", style: GoogleFonts.inter(fontSize: 12, color: Colors.white, fontWeight: FontWeight.bold)) - : skipped + : skipped || extra ? TextSpan() : TextSpan( text: exercise.repeats!.toStringAsFixed(0) + @@ -422,16 +426,16 @@ class ExerciseTile extends StatelessWidget with Trans { ")", style: GoogleFonts.inter(fontSize: 12, color: Colors.white, fontWeight: FontWeight.bold)), TextSpan(text: "\n"), - skipped + skipped || extra ? TextSpan() : TextSpan( text: t("Trend") + ": ", style: GoogleFonts.inter(fontSize: 12, color: Colors.yellow[400], fontWeight: FontWeight.bold)), - skipped + skipped || extra ? TextSpan() : TextSpan( - text: exercise.trendText, - style: GoogleFonts.inter(fontSize: 12, color: Colors.white, fontWeight: FontWeight.bold)), + text: t(exercise.trendText), + style: GoogleFonts.inter(fontSize: 12, color: exercise.trendColor, fontWeight: FontWeight.bold)), ]), )), ]),