WT1.1.10+5 bugfix

This commit is contained in:
bossanyit 2021-03-28 12:45:14 +02:00
parent f724737ea3
commit 1962ba24cb
41 changed files with 397 additions and 173 deletions

BIN
asset/menu/leg_abductor.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -400,6 +400,7 @@
"Or, you can redifine this exercise queue in the Compact Test menu":"Or, you can redifine this exercise queue in the Compact Test menu", "Or, you can redifine this exercise queue in the Compact Test menu":"Or, you can redifine this exercise queue in the Compact Test menu",
"you are able to do 12-20 repeats with":"you are able to do 12-20 repeats with", "you are able to do 12-20 repeats with":"you are able to do 12-20 repeats with",
"You have an active Test Set!":"You have an active Test Set!", "You have an active Test Set!":"You have an active Test Set!",
"Do you want to override it?":"Do you want to override it?",
"Press OK to continue":"Press OK to continue", "Press OK to continue":"Press OK to continue",
"Continue":"Continue", "Continue":"Continue",
" your ":" your ", " your ":" your ",

View File

@ -396,6 +396,7 @@
"Or, you can redifine this exercise queue in the Compact Test menu":"Vagy változtatsd meg a gyakorlatokat a Tesztközpontban", "Or, you can redifine this exercise queue in the Compact Test menu":"Vagy változtatsd meg a gyakorlatokat a Tesztközpontban",
"you are able to do 12-20 repeats with":"amivel képes vagy 12-20 ismétlésre", "you are able to do 12-20 repeats with":"amivel képes vagy 12-20 ismétlésre",
"You have an active Test Set!":"Van egy aktiv tesztköröd!", "You have an active Test Set!":"Van egy aktiv tesztköröd!",
"Do you want to override it?":"Felülírod?",
"Press OK to continue":"Nyomd meg az OK-t a folytatáshoz", "Press OK to continue":"Nyomd meg az OK-t a folytatáshoz",
"Continue":"Folytatsd", "Continue":"Folytatsd",
" your ":": ", " your ":": ",

View File

@ -21,6 +21,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>10.0</string> <string>12.0</string>
</dict> </dict>
</plist> </plist>

View File

@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig" #include "./Generated.xcconfig"
IPHONEOS_DEPLOYMENT_TARGET = 12.0

View File

@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig" #include "./Generated.xcconfig"
IPHONEOS_DEPLOYMENT_TARGET = 12.0

View File

@ -171,6 +171,8 @@ PODS:
- Purchases (= 3.9.2) - Purchases (= 3.9.2)
- shared_preferences (0.0.1): - shared_preferences (0.0.1):
- Flutter - Flutter
- smartlook (0.0.5):
- Flutter
- sqflite (0.0.2): - sqflite (0.0.2):
- Flutter - Flutter
- FMDB (>= 2.7.5) - FMDB (>= 2.7.5)
@ -199,6 +201,7 @@ DEPENDENCIES:
- path_provider (from `.symlinks/plugins/path_provider/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`)
- purchases_flutter (from `.symlinks/plugins/purchases_flutter/ios`) - purchases_flutter (from `.symlinks/plugins/purchases_flutter/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- smartlook (from `.symlinks/plugins/smartlook/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`)
- video_player (from `.symlinks/plugins/video_player/ios`) - video_player (from `.symlinks/plugins/video_player/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`) - wakelock (from `.symlinks/plugins/wakelock/ios`)
@ -267,6 +270,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/purchases_flutter/ios" :path: ".symlinks/plugins/purchases_flutter/ios"
shared_preferences: shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios" :path: ".symlinks/plugins/shared_preferences/ios"
smartlook:
:path: ".symlinks/plugins/smartlook/ios"
sqflite: sqflite:
:path: ".symlinks/plugins/sqflite/ios" :path: ".symlinks/plugins/sqflite/ios"
video_player: video_player:
@ -319,6 +324,7 @@ SPEC CHECKSUMS:
PurchasesCoreSwift: ea4eabae180416e580ac60366f41aa1fefec0693 PurchasesCoreSwift: ea4eabae180416e580ac60366f41aa1fefec0693
PurchasesHybridCommon: d9bfb34309db4c9ba82a6f7f3a6275c13befdca7 PurchasesHybridCommon: d9bfb34309db4c9ba82a6f7f3a6275c13befdca7
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
smartlook: bda0b1561935a02ef0fea5448258d5ac75027859
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
wakelock: bfc7955c418d0db797614075aabbc58a39ab5107 wakelock: bfc7955c418d0db797614075aabbc58a39ab5107

View File

@ -388,7 +388,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -531,7 +531,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -566,7 +566,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (

View File

@ -44,7 +44,7 @@
<string>fbshareextension</string> <string>fbshareextension</string>
</array> </array>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>10.0</string> <string>12.0</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>

View File

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'dart:collection'; import 'dart:collection';
import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/util/app_language.dart'; import 'package:aitrainer_app/util/app_language.dart';
import 'package:aitrainer_app/model/exercise.dart'; import 'package:aitrainer_app/model/exercise.dart';
import 'package:aitrainer_app/model/workout_menu_tree.dart'; import 'package:aitrainer_app/model/workout_menu_tree.dart';
@ -113,6 +114,9 @@ class GroupDate extends GroupData with Calculate, Common {
@override @override
void temp2Output(Exercise exercise) { void temp2Output(Exercise exercise) {
if (exercise.unitQuantity == null) {
return;
}
Exercise newExercise = exercise.copy(); Exercise newExercise = exercise.copy();
newExercise.datePart = _origDatePart; newExercise.datePart = _origDatePart;
if (this.diagramType == DiagramType.oneRepMax || this.diagramType == DiagramType.percent) { if (this.diagramType == DiagramType.oneRepMax || this.diagramType == DiagramType.percent) {
@ -284,9 +288,7 @@ class DevelopmentByMuscleBloc extends Bloc<DevelopmentByMuscleEvent, Development
double basePercent = 0; double basePercent = 0;
@override @override
DevelopmentByMuscleBloc({this.workoutTreeRepository}) : super(DevelopmentByMuscleStateInitial()) { DevelopmentByMuscleBloc({this.workoutTreeRepository}) : super(DevelopmentByMuscleStateInitial());
Track().track(TrackingEvent.my_muscle_development);
}
Future<void> getData() async { Future<void> getData() async {
workoutTreeRepository.sortedTree = null; workoutTreeRepository.sortedTree = null;
@ -365,6 +367,8 @@ class DevelopmentByMuscleBloc extends Bloc<DevelopmentByMuscleEvent, Development
try { try {
if (event is DevelopmentByMuscleLoad) { if (event is DevelopmentByMuscleLoad) {
yield DevelopmentByMuscleLoadingState(); yield DevelopmentByMuscleLoadingState();
Track().track(TrackingEvent.my_muscle_development);
Cache().setMuscleDevelopmentSeen();
await getData(); await getData();
yield DevelopmentByMuscleReadyState(); yield DevelopmentByMuscleReadyState();
} else if (event is DevelopmentByMuscleDiagramTypeChange) { } else if (event is DevelopmentByMuscleDiagramTypeChange) {

View File

@ -81,7 +81,7 @@ class ExerciseControlBloc extends Bloc<ExerciseControlEvent, ExerciseControlStat
} }
exerciseRepository.end = DateTime.now(); exerciseRepository.end = DateTime.now();
await exerciseRepository.addExercise(); await exerciseRepository.addExercise();
exerciseRepository.initExercise(); //exerciseRepository.initExercise();
step <= 3 ? timerBloc.add(TimerStart(duration: 300)) : timerBloc.add(TimerEnd()); step <= 3 ? timerBloc.add(TimerStart(duration: 300)) : timerBloc.add(TimerEnd());
} }

View File

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/model/exercise.dart'; import 'package:aitrainer_app/model/exercise.dart';
import 'package:aitrainer_app/repository/exercise_repository.dart'; import 'package:aitrainer_app/repository/exercise_repository.dart';
import 'package:aitrainer_app/util/enums.dart'; import 'package:aitrainer_app/util/enums.dart';
@ -21,6 +22,7 @@ class ExerciseLogBloc extends Bloc<ExerciseLogEvent, ExerciseLogState> {
try { try {
if (event is ExerciseLogLoad) { if (event is ExerciseLogLoad) {
yield ExerciseLogLoading(); yield ExerciseLogLoading();
await Cache().setExerciseLogSeen();
Track().track(TrackingEvent.exercise_log_open); Track().track(TrackingEvent.exercise_log_open);
yield ExerciseLogReady(); yield ExerciseLogReady();
} else if (event is ExerciseLogDelete) { } else if (event is ExerciseLogDelete) {

View File

@ -94,6 +94,7 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
yield ExerciseNewReady(); yield ExerciseNewReady();
} else if (event is ExerciseNewQuantityUnitChange) { } else if (event is ExerciseNewQuantityUnitChange) {
yield ExerciseNewLoading(); yield ExerciseNewLoading();
log("Event quantityUnit " + event.quantity.toStringAsFixed(0));
exerciseRepository.setUnitQuantity(event.quantity); exerciseRepository.setUnitQuantity(event.quantity);
unitQuantity = event.quantity; unitQuantity = event.quantity;
yield ExerciseNewReady(); yield ExerciseNewReady();
@ -147,7 +148,7 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
yield ExerciseNewLoading(); yield ExerciseNewLoading();
exerciseRepository.end = DateTime.now(); exerciseRepository.end = DateTime.now();
await exerciseRepository.addExercise(); await exerciseRepository.addExercise();
exerciseRepository.initExercise(); // exerciseRepository.initExercise();
menuBloc.add(MenuTreeDown(parent: 0)); menuBloc.add(MenuTreeDown(parent: 0));
Cache().initBadges(); Cache().initBadges();
Track().track(TrackingEvent.exercise_new, eventValue: exerciseRepository.exerciseType.name); Track().track(TrackingEvent.exercise_new, eventValue: exerciseRepository.exerciseType.name);

View File

@ -4,8 +4,6 @@ import 'package:aitrainer_app/bloc/account/account_bloc.dart';
import 'package:aitrainer_app/model/cache.dart'; import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/repository/customer_repository.dart'; import 'package:aitrainer_app/repository/customer_repository.dart';
import 'package:aitrainer_app/repository/user_repository.dart'; import 'package:aitrainer_app/repository/user_repository.dart';
import 'package:aitrainer_app/service/exercise_tree_service.dart';
import 'package:aitrainer_app/service/exercise_type_service.dart';
import 'package:aitrainer_app/util/common.dart'; import 'package:aitrainer_app/util/common.dart';
import 'package:aitrainer_app/util/enums.dart'; import 'package:aitrainer_app/util/enums.dart';
import 'package:aitrainer_app/util/track.dart'; import 'package:aitrainer_app/util/track.dart';
@ -25,12 +23,7 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
final bool isRegistration; final bool isRegistration;
bool dataPolicyAllowed = false; bool dataPolicyAllowed = false;
bool obscure = true; bool obscure = true;
LoginBloc({this.accountBloc, this.userRepository, this.context, this.isRegistration}) : super(LoginInitial()) { LoginBloc({this.accountBloc, this.userRepository, this.context, this.isRegistration}) : super(LoginInitial());
if (isRegistration) {
ExerciseTreeApi().getExerciseTree();
ExerciseTypeApi().getExerciseTypes();
}
}
@override @override
Stream<LoginState> mapEventToState( Stream<LoginState> mapEventToState(

View File

@ -43,11 +43,11 @@ class SettingsBloc extends Bloc<SettingsEvent, SettingsState> with Logging {
_locale = AppLanguage().appLocal; _locale = AppLanguage().appLocal;
yield SettingsReady(_locale); yield SettingsReady(_locale);
} else if (event is SettingsSetServer) { } else if (event is SettingsSetServer) {
yield SettingsLoading(); //yield SettingsLoading();
final bool live = event.live; final bool live = event.live;
Cache().setServer(live); Cache().setServer(live);
Track().track(TrackingEvent.settings_server, eventValue: live.toString()); Track().track(TrackingEvent.settings_server, eventValue: live.toString());
yield SettingsReady(_locale); //yield SettingsReady(_locale);
} else if (event is SettingsSetHardware) { } else if (event is SettingsSetHardware) {
yield SettingsLoading(); yield SettingsLoading();

View File

@ -21,6 +21,7 @@ part 'test_set_edit_state.dart';
class TestSetEditBloc extends Bloc<TestSetEditEvent, TestSetEditState> { class TestSetEditBloc extends Bloc<TestSetEditEvent, TestSetEditState> {
final String templateName; final String templateName;
final String templateNameTranslation; final String templateNameTranslation;
String templateDescription;
final WorkoutTreeRepository workoutTreeRepository; final WorkoutTreeRepository workoutTreeRepository;
final MenuBloc menuBloc; final MenuBloc menuBloc;
final List<ExerciseType> _exerciseTypes = List(); final List<ExerciseType> _exerciseTypes = List();
@ -33,6 +34,7 @@ class TestSetEditBloc extends Bloc<TestSetEditEvent, TestSetEditState> {
Cache().exercisePlanTemplates.forEach((element) { Cache().exercisePlanTemplates.forEach((element) {
final ExercisePlanTemplate template = element as ExercisePlanTemplate; final ExercisePlanTemplate template = element as ExercisePlanTemplate;
if (template.name == templateName) { if (template.name == templateName) {
templateDescription = template.descriptionTranslation;
template.exerciseTypes.forEach((id) { template.exerciseTypes.forEach((id) {
final ExerciseType exerciseType = Cache().getExerciseTypeById(id); final ExerciseType exerciseType = Cache().getExerciseTypeById(id);
_exerciseTypes.add(exerciseType); _exerciseTypes.add(exerciseType);
@ -77,7 +79,7 @@ class TestSetEditBloc extends Bloc<TestSetEditEvent, TestSetEditState> {
yield TestSetEditLoading(); yield TestSetEditLoading();
ExercisePlan exercisePlan = ExercisePlan(templateNameTranslation, Cache().userLoggedIn.customerId); ExercisePlan exercisePlan = ExercisePlan(templateNameTranslation, Cache().userLoggedIn.customerId);
exercisePlan.private = true; exercisePlan.private = true;
exercisePlan.type = ExerciseAbility.mini_test_set.toString(); exercisePlan.type = ExerciseAbility.mini_test_set.enumToString();
exercisePlan.dateAdd = DateTime.now(); exercisePlan.dateAdd = DateTime.now();
ExercisePlan savedExercisePlan = await ExercisePlanApi().saveExercisePlan(exercisePlan); ExercisePlan savedExercisePlan = await ExercisePlanApi().saveExercisePlan(exercisePlan);

View File

@ -54,7 +54,6 @@ class TestSetExecuteBloc extends Bloc<TestSetExecuteEvent, TestSetExecuteState>
element.exerciseType = exerciseType; element.exerciseType = exerciseType;
} }
this.setPlanDetailState(element); this.setPlanDetailState(element);
print("exercises of ${element.exerciseTypeId}: ${element.exercises}");
}); });
} }
} }
@ -88,6 +87,15 @@ class TestSetExecuteBloc extends Bloc<TestSetExecuteEvent, TestSetExecuteState>
} }
await Cache().deleteActiveExercisePlan(); await Cache().deleteActiveExercisePlan();
} }
} else if (event is TestSetExecuteDeleteAllActive) {
print("DeleteAll Test Set: ${exercisePlan.type}");
if (exercisePlan != null) {
exercisePlan = null;
if (exercisePlanDetails != null) {
exercisePlanDetails.removeRange(0, exercisePlanDetails.length - 1);
}
await Cache().deleteActiveExercisePlan();
}
} else if (event is TestSetExecuteExerciseFinished) { } else if (event is TestSetExecuteExerciseFinished) {
yield TestSetExecuteLoading(); yield TestSetExecuteLoading();
exercisePlanDetails.forEach((element) { exercisePlanDetails.forEach((element) {
@ -120,11 +128,11 @@ class TestSetExecuteBloc extends Bloc<TestSetExecuteEvent, TestSetExecuteState>
exercisePlan = ExercisePlan(Cache().userLoggedIn.name + " Custom Test", Cache().userLoggedIn.customerId); exercisePlan = ExercisePlan(Cache().userLoggedIn.name + " Custom Test", Cache().userLoggedIn.customerId);
exercisePlan.private = true; exercisePlan.private = true;
exercisePlan.dateAdd = DateTime.now(); exercisePlan.dateAdd = DateTime.now();
exercisePlan.type = ExerciseAbility.paralell_test.enumToString();
ExercisePlan savedExercisePlan = await ExercisePlanApi().saveExercisePlan(exercisePlan); ExercisePlan savedExercisePlan = await ExercisePlanApi().saveExercisePlan(exercisePlan);
exercisePlan = savedExercisePlan; exercisePlan = savedExercisePlan;
exercisePlanDetails = List(); exercisePlanDetails = List();
} }
exercisePlan.type = ExerciseAbility.paralell_test.enumToString();
if (!this.existsInPlanDetails(event.exerciseTypeId)) { if (!this.existsInPlanDetails(event.exerciseTypeId)) {
ExercisePlanDetail exercisePlanDetail = ExercisePlanDetail(event.exerciseTypeId); ExercisePlanDetail exercisePlanDetail = ExercisePlanDetail(event.exerciseTypeId);

View File

@ -52,3 +52,7 @@ class TestSetExecuteDeleteExercise extends TestSetExecuteEvent {
class TestSetExecuteDeleteActive extends TestSetExecuteEvent { class TestSetExecuteDeleteActive extends TestSetExecuteEvent {
const TestSetExecuteDeleteActive(); const TestSetExecuteDeleteActive();
} }
class TestSetExecuteDeleteAllActive extends TestSetExecuteEvent {
const TestSetExecuteDeleteAllActive();
}

View File

@ -47,6 +47,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:aitrainer_app/util/app_localization.dart'; import 'package:aitrainer_app/util/app_localization.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:sentry/sentry.dart'; import 'package:sentry/sentry.dart';
import 'package:smartlook/smartlook.dart';
import 'bloc/account/account_bloc.dart'; import 'bloc/account/account_bloc.dart';
import 'bloc/body_development/body_development_bloc.dart'; import 'bloc/body_development/body_development_bloc.dart';
import 'bloc/development_by_muscle/development_by_muscle_bloc.dart'; import 'bloc/development_by_muscle/development_by_muscle_bloc.dart';
@ -165,7 +166,18 @@ Future<Null> main() async {
} }
Future<void> initFlurry() async { Future<void> initFlurry() async {
await Flurry.initialize(androidKey: "JNYCTCWBT34FM3J8TV36", iosKey: "3QBG7BSMGPDH24S8TRQP", enableLog: true); if (!isInDebugMode) {
await Flurry.initialize(androidKey: "JNYCTCWBT34FM3J8TV36", iosKey: "3QBG7BSMGPDH24S8TRQP", enableLog: true);
SetupOptions options = (new SetupOptionsBuilder('682883e5cd71a46160c4f6ed070530ee593f49c6')
..Fps = 2
..StartNewSession = true)
.build();
Smartlook.setupAndStartRecording(options);
Smartlook.enableCrashlytics(true);
Smartlook.setEventTrackingMode(EventTrackingMode.FULL_TRACKING);
}
} }
class WorkoutTestApp extends StatelessWidget { class WorkoutTestApp extends StatelessWidget {

View File

@ -16,6 +16,7 @@ import 'package:aitrainer_app/repository/customer_repository.dart';
import 'package:aitrainer_app/service/firebase_api.dart'; import 'package:aitrainer_app/service/firebase_api.dart';
import 'package:aitrainer_app/service/logging.dart'; import 'package:aitrainer_app/service/logging.dart';
import 'package:aitrainer_app/service/package_service.dart'; import 'package:aitrainer_app/service/package_service.dart';
import 'package:aitrainer_app/main.dart';
import 'package:aitrainer_app/util/enums.dart'; import 'package:aitrainer_app/util/enums.dart';
import 'package:aitrainer_app/util/env.dart'; import 'package:aitrainer_app/util/env.dart';
import 'package:aitrainer_app/util/track.dart'; import 'package:aitrainer_app/util/track.dart';
@ -25,6 +26,7 @@ import 'package:package_info/package_info.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:aitrainer_app/model/exercise_type.dart'; import 'package:aitrainer_app/model/exercise_type.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:smartlook/smartlook.dart';
import 'customer_exercise_device.dart'; import 'customer_exercise_device.dart';
import 'exercise_device.dart'; import 'exercise_device.dart';
@ -69,6 +71,8 @@ class Cache with Logging {
static final String activeExercisePlanKey = 'active_exercise_plan'; static final String activeExercisePlanKey = 'active_exercise_plan';
static final String activeExercisePlanDateKey = 'active_exercise_plan_date'; static final String activeExercisePlanDateKey = 'active_exercise_plan_date';
static final String activeExercisePlanDetailsKey = 'active_exercise_details_plan'; static final String activeExercisePlanDetailsKey = 'active_exercise_details_plan';
static final String exerciseLogSeenKey = 'exercise_log_seen';
static final String muscleDevelopmentSeenKey = 'muscle_development_seen_key';
static String baseUrl = 'http://aitrainer.info:8888/api/'; static String baseUrl = 'http://aitrainer.info:8888/api/';
static final String mediaUrl = 'https://aitrainer.info:4343/media/'; static final String mediaUrl = 'https://aitrainer.info:4343/media/';
@ -111,7 +115,6 @@ class Cache with Logging {
Customer _trainee; Customer _trainee;
List<Exercise> _exercisesTrainee; List<Exercise> _exercisesTrainee;
ExercisePlan _traineeExercisePlan; ExercisePlan _traineeExercisePlan;
List<ExercisePlanDetail> _traineeExercisesPlanDetail;
LinkedHashMap<String, int> _badges = LinkedHashMap(); LinkedHashMap<String, int> _badges = LinkedHashMap();
@ -120,6 +123,8 @@ class Cache with Logging {
String testEnvironment; String testEnvironment;
bool liveServer = true; bool liveServer = true;
bool hasHardware = false; bool hasHardware = false;
bool isExerciseLogSeen = false;
bool isMuscleDevelopmentSeen = false;
factory Cache() { factory Cache() {
return _singleton; return _singleton;
@ -246,10 +251,14 @@ class Cache with Logging {
void setServerAddress(SharedPreferences prefs) { void setServerAddress(SharedPreferences prefs) {
if (this.testEnvironment == "1") { if (this.testEnvironment == "1") {
baseUrl = 'http://aitrainer.app:8899/api/'; baseUrl = 'http://aitrainer.app:8899/api/';
print("TestEnv $baseUrl");
return; return;
} }
final bool live = prefs.getBool(Cache.serverKey); final bool live = prefs.getBool(Cache.serverKey);
if (live == null) { if (live == null) {
baseUrl = 'http://aitrainer.app:8888/api/';
print("Live Env $baseUrl");
liveServer = true;
return; return;
} }
liveServer = live; liveServer = live;
@ -258,6 +267,8 @@ class Cache with Logging {
} else { } else {
baseUrl = 'http://aitrainer.app:8899/api/'; baseUrl = 'http://aitrainer.app:8899/api/';
} }
print("Env $baseUrl");
} }
Future<void> setLoginTypeFromPrefs() async { Future<void> setLoginTypeFromPrefs() async {
@ -364,7 +375,7 @@ class Cache with Logging {
sharedPreferences.setString(Cache.firebaseUidKey, null); sharedPreferences.setString(Cache.firebaseUidKey, null);
sharedPreferences.setString(authTokenKey, ""); sharedPreferences.setString(authTokenKey, "");
} }
await initBadges(); initBadges();
} }
void setExerciseTypes(List<ExerciseType> exerciseTypes) { void setExerciseTypes(List<ExerciseType> exerciseTypes) {
@ -487,13 +498,14 @@ class Cache with Logging {
} }
} }
Future<void> initBadges() async { void initBadges() async {
CustomerRepository customerRepository = CustomerRepository(); CustomerRepository customerRepository = CustomerRepository();
_badges = LinkedHashMap(); _badges = LinkedHashMap();
customerRepository.setCustomer(userLoggedIn); customerRepository.setCustomer(userLoggedIn);
int _ecto = customerRepository.getCustomerPropertyValue(PropertyEnum.Ectomorph.toStr()).toInt(); int _ecto = customerRepository.getCustomerPropertyValue(PropertyEnum.Ectomorph.toStr()).toInt();
int _mezo = customerRepository.getCustomerPropertyValue(PropertyEnum.Mesomorph.toStr()).toInt(); int _mezo = customerRepository.getCustomerPropertyValue(PropertyEnum.Mesomorph.toStr()).toInt();
int _endo = customerRepository.getCustomerPropertyValue(PropertyEnum.Endomorph.toStr()).toInt(); int _endo = customerRepository.getCustomerPropertyValue(PropertyEnum.Endomorph.toStr()).toInt();
//print("endo " + _endo.toString() + " mezo " + _mezo.toString()); //print("endo " + _endo.toString() + " mezo " + _mezo.toString());
if (this.userLoggedIn != null) { if (this.userLoggedIn != null) {
if (this.userLoggedIn.birthYear == null || this.userLoggedIn.birthYear == 0) { if (this.userLoggedIn.birthYear == null || this.userLoggedIn.birthYear == 0) {
@ -524,7 +536,7 @@ class Cache with Logging {
} }
if (this._exercises == null || this._exercises.length == 0) { if (this._exercises == null || this._exercises.length == 0) {
setBadge("home", true); setBadge("home", true);
setBadge("Strength", true); setBadge("Muscle Build / Shape Toning", true);
setBadge("Cardio", true); setBadge("Cardio", true);
} }
if (customerRepository.getHeight() == 0) { if (customerRepository.getHeight() == 0) {
@ -541,6 +553,16 @@ class Cache with Logging {
setBadge("FitnessLevel", true); setBadge("FitnessLevel", true);
setBadge("account", true); setBadge("account", true);
} }
if (this._exercises != null && this._exercises.isNotEmpty) {
if (!isExerciseLogSeen) {
setBadge("exerciseLog", true);
setBadge("development", true);
}
if (!isMuscleDevelopmentSeen) {
setBadge("muscleDevelopment", true);
setBadge("development", true);
}
}
} }
log("Badges: " + _badges.toString()); log("Badges: " + _badges.toString());
} }
@ -557,12 +579,18 @@ class Cache with Logging {
Future<void> initCustomer(int customerId) async { Future<void> initCustomer(int customerId) async {
log(" *** initCustomer"); log(" *** initCustomer");
await PackageApi().getCustomerPackage(customerId); await PackageApi().getCustomerPackage(customerId);
Flurry.setUserId(customerId.toString());
if (!isInDebugMode) {
Flurry.setUserId(customerId.toString());
Smartlook.setUserIdentifier(customerId.toString());
Track().track(TrackingEvent.enter);
}
await setLoginTypeFromPrefs(); await setLoginTypeFromPrefs();
await getActiveExercisePlan(); await getActiveExercisePlan();
await isExerciseLogSeenPrefs();
await isMuscleDevelopmentSeenPrefs();
Cache().startPage = "home"; Cache().startPage = "home";
Track().track(TrackingEvent.enter);
} }
AccessToken get getAccessTokenFacebook => accessTokenFacebook; AccessToken get getAccessTokenFacebook => accessTokenFacebook;
@ -573,4 +601,39 @@ class Cache with Logging {
List get exercisePlanTemplates => this._exercisePlanTemplates; List get exercisePlanTemplates => this._exercisePlanTemplates;
setExercisePlanTemplates(value) => this._exercisePlanTemplates = value; setExercisePlanTemplates(value) => this._exercisePlanTemplates = value;
setExerciseLogSeen() async {
Future<SharedPreferences> prefs = SharedPreferences.getInstance();
SharedPreferences sharedPreferences = await prefs;
isExerciseLogSeen = true;
sharedPreferences.setBool(Cache.exerciseLogSeenKey, true);
}
Future<bool> isExerciseLogSeenPrefs() async {
Future<SharedPreferences> prefs = SharedPreferences.getInstance();
SharedPreferences sharedPreferences = await prefs;
isExerciseLogSeen = sharedPreferences.getBool(Cache.exerciseLogSeenKey);
if (isExerciseLogSeen == null) {
isExerciseLogSeen = false;
}
//print("ExerciseLogSeen $isExerciseLogSeen");
return isExerciseLogSeen;
}
setMuscleDevelopmentSeen() async {
Future<SharedPreferences> prefs = SharedPreferences.getInstance();
SharedPreferences sharedPreferences = await prefs;
isMuscleDevelopmentSeen = true;
sharedPreferences.setBool(Cache.muscleDevelopmentSeenKey, true);
}
Future<bool> isMuscleDevelopmentSeenPrefs() async {
Future<SharedPreferences> prefs = SharedPreferences.getInstance();
SharedPreferences sharedPreferences = await prefs;
isMuscleDevelopmentSeen = sharedPreferences.getBool(Cache.muscleDevelopmentSeenKey);
if (isMuscleDevelopmentSeen == null) {
isMuscleDevelopmentSeen = false;
}
return isMuscleDevelopmentSeen;
}
} }

View File

@ -1,3 +1,7 @@
import 'dart:ui';
import 'package:aitrainer_app/util/app_language.dart';
class ExercisePlanTemplate { class ExercisePlanTemplate {
int exercisePlanTemplateId; int exercisePlanTemplateId;
String name; String name;
@ -12,9 +16,11 @@ class ExercisePlanTemplate {
this.name = json['name']; this.name = json['name'];
this.description = json['description']; this.description = json['description'];
this.templateType = json['templateType']; this.templateType = json['templateType'];
this.nameTranslation = json['translations'] != null && (json['translations']).length > 0 ? json['translations'][0]['name'] : this.name; if (json['translations'].length > 0) {
this.descriptionTranslation = this.nameTranslation = AppLanguage().appLocal == Locale('hu') ? json['translations'][0]['name'] : json['name'];
json['translations'] != null && (json['translations']).length > 0 ? json['translations'][0]['description'] : this.description; this.descriptionTranslation = AppLanguage().appLocal == Locale('hu') ? json['translations'][0]['description'] : json['description'];
}
if (json['details'] != null && (json['details']).length > 0) { if (json['details'] != null && (json['details']).length > 0) {
List details = json['details']; List details = json['details'];
details.forEach((element) { details.forEach((element) {

View File

@ -27,7 +27,13 @@ class ExerciseDeviceRepository {
} }
bool isGymElement(String name) { bool isGymElement(String name) {
return name == "Cable" || name == "Baar" || name == "Gym Machine" || name == "Dumbbells" || name == "Barbell"; return name == "Cable" ||
name == "Baar" ||
name == "Gym Machine" ||
name == "Dumbbells" ||
name == "Barbell" ||
name == "HOME" ||
name == "STREET";
} }
List<ExerciseDevice> getGymDevices() { List<ExerciseDevice> getGymDevices() {

View File

@ -276,7 +276,13 @@ class ExerciseRepository {
return; return;
} }
exerciseList.sort((a, b) => b.dateAdd.compareTo(a.dateAdd)); exerciseList.sort((a, b) {
final String datePartA = DateFormat('yyyyMMdd', AppLanguage().appLocal.toString()).format(a.dateAdd);
String aId = a.exerciseTypeId.toString() + "_" + datePartA;
final String datePartB = DateFormat('yyyyMMdd', AppLanguage().appLocal.toString()).format(b.dateAdd);
String bId = b.exerciseTypeId.toString() + "_" + datePartB;
return aId.compareTo(bId);
});
this.exerciseLogList = List(); this.exerciseLogList = List();
String summary = ""; String summary = "";
@ -289,8 +295,8 @@ class ExerciseRepository {
Exercise exercise = exerciseList[i]; Exercise exercise = exerciseList[i];
int exerciseTypeId = exercise.exerciseTypeId; int exerciseTypeId = exercise.exerciseTypeId;
String exerciseDate = DateFormat("yyyy-MM-dd", AppLanguage().appLocal.toString()).format(exercise.dateAdd); String exerciseDate = DateFormat("yyyy-MM-dd", AppLanguage().appLocal.toString()).format(exercise.dateAdd);
//print(" -- $prevExerciseTypeId - $prevDate"); print(" -- $prevExerciseTypeId - '$prevDate' against $exerciseTypeId - '$exerciseDate'");
if (!(exerciseTypeId == prevExerciseTypeId && prevDate == exerciseDate)) { if (exerciseTypeId != prevExerciseTypeId || prevDate != exerciseDate) {
ExerciseType exerciseType = Cache().getExerciseTypeById(prevExercise.exerciseTypeId); ExerciseType exerciseType = Cache().getExerciseTypeById(prevExercise.exerciseTypeId);
String unit = exerciseType.unitQuantityUnit != null ? exerciseType.unitQuantityUnit : prevExercise.unit; String unit = exerciseType.unitQuantityUnit != null ? exerciseType.unitQuantityUnit : prevExercise.unit;
prevExercise.summary = summary + " " + unit; prevExercise.summary = summary + " " + unit;
@ -308,12 +314,14 @@ class ExerciseRepository {
if (exerciseType.unitQuantity == "1") { if (exerciseType.unitQuantity == "1") {
summary += "x" + exercise.unitQuantity.toStringAsFixed(0); summary += "x" + exercise.unitQuantity.toStringAsFixed(0);
} }
//print(" --- sum " + exerciseType.name + " $summary"); print(" --- sum " + exerciseType.name + " $summary");
prevExerciseTypeId = exerciseTypeId; prevExerciseTypeId = exerciseTypeId;
prevDate = exerciseDate; prevDate = exerciseDate;
prevExercise = exercise; prevExercise = exercise;
prevCount++; prevCount++;
} }
prevExercise.summary = summary;
exerciseLogList.add(prevExercise);
} }
} }

View File

@ -26,7 +26,7 @@ class WorkoutTreeRepository with Logging {
WorkoutType workoutType; WorkoutType workoutType;
final List<WorkoutMenuTree> menuAsExercise = List(); final List<WorkoutMenuTree> menuAsExercise = List();
Future<void> createTree() async { void createTree() {
//if (Cache().getExerciseTree().length > 0 || Cache().getWorkoutMenuTree().length > 0) return; //if (Cache().getExerciseTree().length > 0 || Cache().getWorkoutMenuTree().length > 0) return;
isEnglish = AppLanguage().appLocal == Locale('en'); isEnglish = AppLanguage().appLocal == Locale('en');
log("** Start creating tree on lang: " + log("** Start creating tree on lang: " +
@ -35,14 +35,7 @@ class WorkoutTreeRepository with Logging {
Cache().getExerciseTree().length.toString()); Cache().getExerciseTree().length.toString());
List<ExerciseTree> exerciseTree = Cache().getExerciseTree(); List<ExerciseTree> exerciseTree = Cache().getExerciseTree();
if (exerciseTree == null || exerciseTree.length == 0) {
exerciseTree = await ExerciseTreeApi().getExerciseTree();
}
List<ExerciseType> exerciseTypes = Cache().getExerciseTypes(); List<ExerciseType> exerciseTypes = Cache().getExerciseTypes();
if (exerciseTypes == null || exerciseTypes.length == 0) {
exerciseTypes = await ExerciseTypeApi().getExerciseTypes();
}
exerciseTree.sort((a, b) => a.sort.compareTo(b.sort)); exerciseTree.sort((a, b) => a.sort.compareTo(b.sort));
@ -177,7 +170,7 @@ class WorkoutTreeRepository with Logging {
WorkoutMenuTree treeItem = value as WorkoutMenuTree; WorkoutMenuTree treeItem = value as WorkoutMenuTree;
if (treeItem.id == treeId) { if (treeItem.id == treeId) {
isTreeItem1RM = isTreeItem1RM || treeItem.is1RM; isTreeItem1RM = isTreeItem1RM || treeItem.is1RM;
//log (treeItem.name + " 1RM " + treeItem.is1RM.toString() ); //log(treeItem.name + " 1RM " + treeItem.is1RM.toString());
} }
}); });
@ -305,7 +298,7 @@ class WorkoutTreeRepository with Logging {
WorkoutMenuTree workoutTree = value as WorkoutMenuTree; WorkoutMenuTree workoutTree = value as WorkoutMenuTree;
if (!workoutTree.nameEnglish.contains('Muscle Build') && workoutTree.is1RM && workoutTree.exerciseTypeId == 0) { if (!workoutTree.nameEnglish.contains('Muscle Build') && workoutTree.is1RM && workoutTree.exerciseTypeId == 0) {
String treeName = getAntagonistSort(workoutTree.nameEnglish) + ". " + workoutTree.name; String treeName = getAntagonistSort(workoutTree.nameEnglish) + ". " + workoutTree.name;
print("TreeName $treeName ${workoutTree.name}"); //print("TreeName $treeName ${workoutTree.name}");
sortedTree[treeName] = this.getBranchList(workoutTree.id); sortedTree[treeName] = this.getBranchList(workoutTree.id);
} }
}); });

View File

@ -21,6 +21,7 @@ class ExerciseTreeApi with Logging {
await Future.forEach(exerciseTree, (element) async { await Future.forEach(exerciseTree, (element) async {
element.imageUrl = await buildImage(element.imageUrl, element.treeId); element.imageUrl = await buildImage(element.imageUrl, element.treeId);
}); });
exerciseTree = await getExerciseTreeParents(exerciseTree);
log("ExerciseTree downloaded"); log("ExerciseTree downloaded");
Cache().setExerciseTree(exerciseTree); Cache().setExerciseTree(exerciseTree);
} }

View File

@ -66,7 +66,6 @@ class PackageApi {
exerciseTree = this.getExerciseTreeParents(exerciseTree, exerciseTreeParents); exerciseTree = this.getExerciseTreeParents(exerciseTree, exerciseTreeParents);
if (exerciseTree != null) { if (exerciseTree != null) {
await Future.forEach(exerciseTree, (element) async { await Future.forEach(exerciseTree, (element) async {
print("Tree ${element.toJson()}");
element.imageUrl = await ExerciseTreeApi().buildImage(element.imageUrl, element.treeId); element.imageUrl = await ExerciseTreeApi().buildImage(element.imageUrl, element.treeId);
}); });
Cache().setExerciseTree(exerciseTree); Cache().setExerciseTree(exerciseTree);

View File

@ -113,8 +113,11 @@ mixin Common {
} }
static Widget badgedIcon(Color color, IconData icon, String badgeKey) { static Widget badgedIcon(Color color, IconData icon, String badgeKey) {
bool show = Cache().getBadges()[badgeKey] != null; //print("BadgetIcon: " + Cache().getBadges().toString());
int counter = Cache().getBadges()[badgeKey] != null ? Cache().getBadges()[badgeKey] : 0; int badgeValue = Cache().getBadges()[badgeKey];
bool show = (badgeValue != null);
int counter = show ? badgeValue : 0;
//print("show $show BadgeKey $badgeKey count $counter");
return Badge( return Badge(
position: BadgePosition.topEnd(top: -10, end: -10), position: BadgePosition.topEnd(top: -10, end: -10),
animationDuration: Duration(milliseconds: 500), animationDuration: Duration(milliseconds: 500),

View File

@ -5,6 +5,7 @@ import 'package:aitrainer_app/service/tracking_service.dart';
import 'package:aitrainer_app/util/enums.dart'; import 'package:aitrainer_app/util/enums.dart';
import 'package:flurry/flurry.dart'; import 'package:flurry/flurry.dart';
import 'package:aitrainer_app/model/tracking.dart' as model; import 'package:aitrainer_app/model/tracking.dart' as model;
import 'package:smartlook/smartlook.dart';
class Track with Logging { class Track with Logging {
static final Track _singleton = Track._internal(); static final Track _singleton = Track._internal();
@ -18,6 +19,7 @@ class Track with Logging {
void track(TrackingEvent event, {String eventValue = ""}) { void track(TrackingEvent event, {String eventValue = ""}) {
if (!isInDebugMode) { if (!isInDebugMode) {
Flurry.logEvent(event.toString()); Flurry.logEvent(event.toString());
Smartlook.setGlobalEventProperty(event.toString(), eventValue, false);
model.Tracking tracking = model.Tracking(); model.Tracking tracking = model.Tracking();
tracking.customerId = Cache().userLoggedIn.customerId; tracking.customerId = Cache().userLoggedIn.customerId;
tracking.event = event.enumToString(); tracking.event = event.enumToString();

View File

@ -85,6 +85,7 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
} else if (Cache().getTrainee() != null && customerId == Cache().getTrainee().customerId) { } else if (Cache().getTrainee() != null && customerId == Cache().getTrainee().customerId) {
exerciseRepository.exerciseList = exerciseRepository.getExerciseListTrainee(); exerciseRepository.exerciseList = exerciseRepository.getExerciseListTrainee();
} }
//print("ExerciseList ${exerciseRepository.exerciseList}");
exerciseRepository.sortByDate(); exerciseRepository.sortByDate();
List<Widget> listWidget = List(); List<Widget> listWidget = List();
@ -146,6 +147,7 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
origDate = exerciseDate; origDate = exerciseDate;
} }
}); });
//print("ListExerices $listExercises");
if (listExercises.length > 0) { if (listExercises.length > 0) {
listWidget.add(Container( listWidget.add(Container(
margin: const EdgeInsets.only(left: 4.0), margin: const EdgeInsets.only(left: 4.0),
@ -194,27 +196,12 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
exercise.summary == null ? "" : exercise.summary, exercise.summary == null ? "" : exercise.summary,
style: TextStyle(fontSize: 12, color: Colors.blue[800]), style: TextStyle(fontSize: 12, color: Colors.blue[800]),
)), )),
Stack( IconButton(
children: [ iconSize: 36,
IconButton( icon: Icon(CustomIcon.heart_1, color: Colors.orange[800]),
iconSize: 36, onPressed: () {
icon: Icon(CustomIcon.heart_1, color: Colors.blue[800]), evaluation(exerciseRepository, exercise);
onPressed: () { },
evaluation(exerciseRepository, exercise);
},
),
Cache().hasPurchased
? Offstage()
: GestureDetector(
child: Image.asset(
'asset/image/lock.png',
height: 25,
width: 25,
),
onTap: () {
evaluation(exerciseRepository, exercise);
}),
],
), ),
IconButton( IconButton(
icon: Icon(Icons.delete, color: Colors.black12), icon: Icon(Icons.delete, color: Colors.black12),
@ -295,7 +282,25 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
), ),
FlatButton( FlatButton(
child: Text(t("Yes")), child: Text(t("Yes")),
onPressed: () => {bloc.add(ExerciseLogDelete(exercise: exercise)), Navigator.pop(context)}, onPressed: () {
Navigator.pop(context);
if (!Cache().hasPurchased) {
showDialog(
context: context,
builder: (BuildContext context) {
return DialogPremium(
unlocked: Cache().hasPurchased,
unlockRound: 1,
unlockedText: t("Enjoy also this premium fetaure to delete mistyped old exercises."),
function: "Delete Exercise",
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
);
});
} else {
bloc.add(ExerciseLogDelete(exercise: exercise));
}
},
) )
], ],
)); ));

View File

@ -3,6 +3,7 @@ import 'dart:collection';
import 'package:aitrainer_app/bloc/exercise_new/exercise_new_bloc.dart'; import 'package:aitrainer_app/bloc/exercise_new/exercise_new_bloc.dart';
import 'package:aitrainer_app/bloc/menu/menu_bloc.dart'; import 'package:aitrainer_app/bloc/menu/menu_bloc.dart';
import 'package:aitrainer_app/bloc/test_set_execute/test_set_execute_bloc.dart'; import 'package:aitrainer_app/bloc/test_set_execute/test_set_execute_bloc.dart';
import 'package:aitrainer_app/library/custom_icon_icons.dart';
import 'package:aitrainer_app/model/cache.dart'; import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/model/exercise_ability.dart'; import 'package:aitrainer_app/model/exercise_ability.dart';
import 'package:aitrainer_app/model/exercise_type.dart'; import 'package:aitrainer_app/model/exercise_type.dart';
@ -20,6 +21,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_form_bloc/flutter_form_bloc.dart'; import 'package:flutter_form_bloc/flutter_form_bloc.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:modal_progress_hud/modal_progress_hud.dart'; import 'package:modal_progress_hud/modal_progress_hud.dart';
class ExerciseNewPage extends StatefulWidget { class ExerciseNewPage extends StatefulWidget {
@ -115,9 +117,18 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
exerciseBloc.add(ExerciseNewQuantityChange(quantity: double.parse(value))); exerciseBloc.add(ExerciseNewQuantityChange(quantity: double.parse(value)));
}, },
onUnitQuantityChanged: (value) => exerciseBloc.add(ExerciseNewQuantityUnitChange(quantity: double.parse(value))), onUnitQuantityChanged: (value) => exerciseBloc.add(ExerciseNewQuantityUnitChange(quantity: double.parse(value))),
onSubmit: () => confirmationDialog(exerciseBloc, menuBloc), //onSubmit: () => confirmationDialog(exerciseBloc, menuBloc),
exerciseTypeId: exerciseType.exerciseTypeId, exerciseTypeId: exerciseType.exerciseTypeId,
)), )),
floatingActionButton: FloatingActionButton.extended(
onPressed: () => save(exerciseBloc, menuBloc),
backgroundColor: Colors.orange[800],
icon: Icon(CustomIcon.save),
label: Text(
t("Save"),
style: GoogleFonts.inter(fontWeight: FontWeight.bold, fontSize: 16),
),
),
bottomNavigationBar: BottomBarMultipleExercises( bottomNavigationBar: BottomBarMultipleExercises(
isSet: false, isSet: false,
exerciseTypeId: exerciseType.exerciseTypeId, exerciseTypeId: exerciseType.exerciseTypeId,
@ -125,7 +136,18 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
); );
} }
void confirmationDialog(ExerciseNewBloc bloc, MenuBloc menuBloc) { void save(ExerciseNewBloc bloc, MenuBloc menuBloc) {
// ignore: close_sinks
final TestSetExecuteBloc executeBloc = BlocProvider.of<TestSetExecuteBloc>(context);
if (executeBloc != null && executeBloc.existsActivePlan() == true) {
confirmationOverride(bloc);
} else {
confirmationSave(bloc, menuBloc);
}
}
void confirmationSave(ExerciseNewBloc bloc, MenuBloc menuBloc) {
if (bloc.exerciseRepository.exercise.quantity == null) { if (bloc.exerciseRepository.exercise.quantity == null) {
return; return;
} }
@ -173,17 +195,49 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
), ),
FlatButton( FlatButton(
child: Text(t("Yes")), child: Text(t("Yes")),
onPressed: () => { onPressed: () {
bloc.exerciseRepository.setCustomer(Cache().userLoggedIn), saveAll(bloc);
bloc.add(ExerciseNewSubmit()), if (executeBloc.existsActivePlan() == true) {
Navigator.pop(context), executeBloc.add(TestSetExecuteExerciseFinished(
if (executeBloc.existsActivePlan() == true) exerciseTypeId: bloc.exerciseRepository.exerciseType.exerciseTypeId,
{ quantity: bloc.exerciseRepository.exercise.quantity,
executeBloc.add(TestSetExecuteExerciseFinished( unitQuantity: bloc.exerciseRepository.exercise.unitQuantity));
exerciseTypeId: bloc.exerciseRepository.exerciseType.exerciseTypeId, }
quantity: bloc.exerciseRepository.exercise.quantity, Navigator.pop(context);
unitQuantity: bloc.exerciseRepository.exercise.unitQuantity)), },
} )
],
));
}
void saveAll(ExerciseNewBloc bloc) {
bloc.exerciseRepository.setCustomer(Cache().userLoggedIn);
bloc.add(ExerciseNewSubmit());
}
void confirmationOverride(ExerciseNewBloc bloc) {
// ignore: close_sinks
final TestSetExecuteBloc executeBloc = BlocProvider.of<TestSetExecuteBloc>(context);
showCupertinoDialog(
useRootNavigator: true,
context: context,
builder: (_) => CupertinoAlertDialog(
title: Text(t("You have an active Test Set!"), style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.red[800])),
content: Column(children: [
Divider(),
Text(t("Do you want to override it?"), style: GoogleFonts.archivoBlack(fontSize: 16, color: Colors.blue[800])),
]),
actions: [
FlatButton(
child: Text(t("No"), style: GoogleFonts.archivoBlack(fontSize: 16, color: Colors.blue[800])),
onPressed: () => Navigator.pop(context),
),
FlatButton(
child: Text(t("Yes"), style: GoogleFonts.archivoBlack(fontSize: 16, color: Colors.red[800])),
onPressed: () {
Navigator.pop(context);
executeBloc.add(TestSetExecuteDeleteAllActive());
saveAll(bloc);
}, },
) )
], ],

View File

@ -6,6 +6,7 @@ import 'package:aitrainer_app/repository/exercise_repository.dart';
import 'package:aitrainer_app/util/enums.dart'; import 'package:aitrainer_app/util/enums.dart';
import 'package:aitrainer_app/util/track.dart'; import 'package:aitrainer_app/util/track.dart';
import 'package:aitrainer_app/widgets/dialog_premium.dart'; import 'package:aitrainer_app/widgets/dialog_premium.dart';
import 'package:badges/badges.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:aitrainer_app/util/trans.dart'; import 'package:aitrainer_app/util/trans.dart';
import 'package:aitrainer_app/widgets/app_bar.dart'; import 'package:aitrainer_app/widgets/app_bar.dart';
@ -29,6 +30,11 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
double mediaWidth = MediaQuery.of(context).size.width; double mediaWidth = MediaQuery.of(context).size.width;
double imageWidth = (mediaWidth - 45) / 2; double imageWidth = (mediaWidth - 45) / 2;
bool showExerciseLogBadge = Cache().getBadges()["exerciseLog"] != null;
int counterExerciseLogBadge = Cache().getBadges()["exerciseLog"] != null ? Cache().getBadges()["exerciseLog"] : 0;
bool showMuscleDevelopmentBadge = Cache().getBadges()["muscleDevelopment"] != null;
int counterMuscleDevelopmentBadge = Cache().getBadges()["muscleDevelopment"] != null ? Cache().getBadges()["muscleDevelopment"] : 0;
return Scaffold( return Scaffold(
appBar: AppBarNav(depth: 0), appBar: AppBarNav(depth: 0),
body: Container( body: Container(
@ -43,21 +49,33 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
child: CustomScrollView(scrollDirection: Axis.vertical, slivers: [ child: CustomScrollView(scrollDirection: Axis.vertical, slivers: [
SliverGrid( SliverGrid(
delegate: SliverChildListDelegate([ delegate: SliverChildListDelegate([
ImageButton( Badge(
width: imageWidth, padding: EdgeInsets.all(8),
textAlignment: Alignment.topCenter, position: BadgePosition.topEnd(top: -5, end: -3),
text: t("My Exercise Logs"), animationDuration: Duration(milliseconds: 500),
style: GoogleFonts.robotoMono( animationType: BadgeAnimationType.slide,
textStyle: TextStyle( badgeColor: Colors.red,
fontSize: 14, showBadge: showExerciseLogBadge,
badgeContent: Text(counterExerciseLogBadge.toString(),
style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontSize: 16,
backgroundColor: Colors.black54.withOpacity(0.4))), )),
image: "asset/image/edzesnaplom400400.jpg", child: ImageButton(
left: 5, width: imageWidth,
onTap: () => this.callBackExerciseLog(exerciseRepository, customerRepository), textAlignment: Alignment.topCenter,
isLocked: false, text: t("My Exercise Logs"),
), style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/edzesnaplom400400.jpg",
left: 5,
onTap: () => this.callBackExerciseLog(exerciseRepository, customerRepository),
isLocked: false,
)),
ImageButton( ImageButton(
width: imageWidth, width: imageWidth,
textAlignment: Alignment.topLeft, textAlignment: Alignment.topLeft,
@ -96,21 +114,33 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
}, },
isLocked: true, isLocked: true,
), */ ), */
ImageButton( Badge(
width: imageWidth, padding: EdgeInsets.all(8),
textAlignment: Alignment.topLeft, position: BadgePosition.topEnd(top: -5, end: -3),
text: t("Development Of Muscles"), animationDuration: Duration(milliseconds: 500),
style: GoogleFonts.robotoMono( animationType: BadgeAnimationType.slide,
textStyle: TextStyle( badgeColor: Colors.red,
fontSize: 14, showBadge: showMuscleDevelopmentBadge,
badgeContent: Text(counterMuscleDevelopmentBadge.toString(),
style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontSize: 16,
backgroundColor: Colors.black54.withOpacity(0.4))), )),
image: "asset/image/izomcsop400400.jpg", child: ImageButton(
left: 5, width: imageWidth,
onTap: () => {Navigator.of(context).pushNamed('mydevelopmentMusclePage', arguments: args)}, textAlignment: Alignment.topLeft,
isLocked: true, text: t("Development Of Muscles"),
), style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/izomcsop400400.jpg",
left: 5,
onTap: () => {Navigator.of(context).pushNamed('mydevelopmentMusclePage', arguments: args)},
isLocked: true,
)),
ImageButton( ImageButton(
width: imageWidth, width: imageWidth,
left: 5, left: 5,

View File

@ -86,6 +86,7 @@ class SettingsPage extends StatelessWidget with Trans {
title: Container(), title: Container(),
); );
} }
print("Live: ${Cache().liveServer}");
return ListTile( return ListTile(
leading: Icon(Icons.data_usage_sharp), leading: Icon(Icons.data_usage_sharp),
subtitle: Text("For Test purpuses select Test-Server. After that please restart the the App"), subtitle: Text("For Test purpuses select Test-Server. After that please restart the the App"),

View File

@ -136,8 +136,8 @@ class TestSetEdit extends StatelessWidget with Trans {
barrierDismissible: false, barrierDismissible: false,
builder: (BuildContext context) { builder: (BuildContext context) {
return DialogCommon( return DialogCommon(
title: "Own Body", title: bloc.templateNameTranslation,
descriptions: t("execute these exercises with maximum repeats. Leave at least 3 min rest time between time"), descriptions: bloc.templateDescription,
text: "OK", text: "OK",
onTap: () => {Navigator.of(context).pop()}, onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()}, onCancel: () => {Navigator.of(context).pop()},
@ -182,7 +182,9 @@ class TestSetEdit extends StatelessWidget with Trans {
} }
alternatives.forEach((element) { alternatives.forEach((element) {
list.add(getImageStack(element, menuBloc, bloc)); if (workoutTree.exerciseTypeId != element.exerciseTypeId) {
list.add(getImageStack(element, menuBloc, bloc));
}
}); });
return list; return list;

View File

@ -2,6 +2,7 @@ import 'dart:collection';
import 'package:aitrainer_app/bloc/test_set_execute/test_set_execute_bloc.dart'; import 'package:aitrainer_app/bloc/test_set_execute/test_set_execute_bloc.dart';
import 'package:aitrainer_app/bloc/test_set_new/test_set_new_bloc.dart'; import 'package:aitrainer_app/bloc/test_set_new/test_set_new_bloc.dart';
import 'package:aitrainer_app/library/custom_icon_icons.dart';
import 'package:aitrainer_app/model/exercise_plan_detail.dart'; import 'package:aitrainer_app/model/exercise_plan_detail.dart';
import 'package:aitrainer_app/model/exercise_type.dart'; import 'package:aitrainer_app/model/exercise_type.dart';
import 'package:aitrainer_app/repository/exercise_repository.dart'; import 'package:aitrainer_app/repository/exercise_repository.dart';
@ -11,6 +12,7 @@ import 'package:aitrainer_app/widgets/bottom_bar_multiple_exercises.dart';
import 'package:aitrainer_app/widgets/exercise_save.dart'; import 'package:aitrainer_app/widgets/exercise_save.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:modal_progress_hud/modal_progress_hud.dart'; import 'package:modal_progress_hud/modal_progress_hud.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
@ -67,6 +69,18 @@ class TestSetNew extends StatelessWidget with Trans {
); );
}), }),
)), )),
floatingActionButton: FloatingActionButton.extended(
onPressed: () => {
Navigator.of(context).pop(),
bloc.add(TestSetNewSubmit()),
},
backgroundColor: Colors.orange[800],
icon: Icon(CustomIcon.save),
label: Text(
t("Save"),
style: GoogleFonts.inter(fontWeight: FontWeight.bold, fontSize: 16),
),
),
bottomNavigationBar: BottomBarMultipleExercises( bottomNavigationBar: BottomBarMultipleExercises(
isSet: executeBloc.miniTestSet == true, isSet: executeBloc.miniTestSet == true,
exerciseTypeId: exerciseType.exerciseTypeId, exerciseTypeId: exerciseType.exerciseTypeId,
@ -76,20 +90,21 @@ class TestSetNew extends StatelessWidget with Trans {
Widget getExercises(TestSetNewBloc bloc) { Widget getExercises(TestSetNewBloc bloc) {
return ExerciseSave( return ExerciseSave(
exerciseName: bloc.exerciseType.nameTranslation, exerciseName: bloc.exerciseType.nameTranslation,
exerciseDescription: bloc.exerciseType.descriptionTranslation, exerciseDescription: bloc.exerciseType.descriptionTranslation,
exerciseTask: t("Please take a relative bigger weight and repeat 12-20 times"), exerciseTask: t("Please take a relative bigger weight and repeat 12-20 times"),
unit: bloc.exerciseType.unit, unit: bloc.exerciseType.unit,
unitQuantityUnit: bloc.exerciseType.unitQuantityUnit, unitQuantityUnit: bloc.exerciseType.unitQuantityUnit,
hasUnitQuantity: bloc.exerciseType.unitQuantityUnit != null, hasUnitQuantity: bloc.exerciseType.unitQuantityUnit != null,
onQuantityChanged: (value) { onQuantityChanged: (value) {
bloc.add(TestSetNewChangeQuantity(quantity: double.parse(value))); bloc.add(TestSetNewChangeQuantity(quantity: double.parse(value)));
}, },
onUnitQuantityChanged: (value) => bloc.add(TestSetNewChangeQuantityUnit(quantity: double.parse(value))), onUnitQuantityChanged: (value) => bloc.add(TestSetNewChangeQuantityUnit(quantity: double.parse(value))),
exerciseTypeId: bloc.exerciseType.exerciseTypeId, exerciseTypeId: bloc.exerciseType.exerciseTypeId,
onSubmit: () { /* onSubmit: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
bloc.add(TestSetNewSubmit()); bloc.add(TestSetNewSubmit());
}); } */
);
} }
} }

View File

@ -143,7 +143,7 @@ class _AppBarNav extends State<AppBarNav> with SingleTickerProviderStateMixin, C
Widget getAnimatedWidget() { Widget getAnimatedWidget() {
double cWidth = mediaSizeWidth(context); double cWidth = mediaSizeWidth(context);
double percent = Cache().getPercentExercises(); double percent = Cache().getPercentExercises();
if (percent == -1) { if (percent == -1 || percent.isNaN) {
menuBloc.menuTreeRepository.createTree(); menuBloc.menuTreeRepository.createTree();
ExerciseRepository exerciseRepository = ExerciseRepository(); ExerciseRepository exerciseRepository = ExerciseRepository();
exerciseRepository.getBaseExerciseFinishedPercent(); exerciseRepository.getBaseExerciseFinishedPercent();
@ -152,7 +152,7 @@ class _AppBarNav extends State<AppBarNav> with SingleTickerProviderStateMixin, C
percent = 0; percent = 0;
} }
} }
if (percent == null) { if (percent == null || percent.isNaN) {
percent = 0; percent = 0;
} }
int sizeExerciseList = Cache().getExercises() == null ? 0 : Cache().getExercises().length; int sizeExerciseList = Cache().getExercises() == null ? 0 : Cache().getExercises().length;

View File

@ -1,5 +1,4 @@
import 'package:aitrainer_app/library/gradient_bottom_navigation_bar.dart'; import 'package:aitrainer_app/library/gradient_bottom_navigation_bar.dart';
import 'package:aitrainer_app/util/app_localization.dart';
import 'package:aitrainer_app/model/cache.dart'; import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/service/logging.dart'; import 'package:aitrainer_app/service/logging.dart';
import 'package:aitrainer_app/util/common.dart'; import 'package:aitrainer_app/util/common.dart';
@ -25,13 +24,6 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
super.initState(); super.initState();
} }
@override
void didUpdateWidget(BottomNavigator oldWidget) {
Cache().initBadges();
super.didUpdateWidget(oldWidget);
}
@override @override
void didChangeDependencies() { void didChangeDependencies() {
Cache().initBadges(); Cache().initBadges();
@ -56,28 +48,25 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
backgroundColor: bgrColor, backgroundColor: bgrColor,
icon: Common.badgedIcon(inactive, Icons.home, "home"), icon: Common.badgedIcon(inactive, Icons.home, "home"),
activeIcon: Common.badgedIcon(active, Icons.home, "home"), activeIcon: Common.badgedIcon(active, Icons.home, "home"),
title: new Text(t("Home"), style: TextStyle(fontSize: 12)), title: Text(t("Home"), style: TextStyle(fontSize: 12)),
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
backgroundColor: bgrColor, backgroundColor: bgrColor,
icon: new Icon(Icons.trending_up, color: inactive), icon: Common.badgedIcon(inactive, Icons.trending_up, "development"),
activeIcon: new Icon( activeIcon: Common.badgedIcon(active, Icons.trending_up, "development"),
Icons.trending_up, title: Text(
color: active,
),
title: new Text(
t("My Development"), t("My Development"),
style: TextStyle(fontSize: 12), style: TextStyle(fontSize: 12),
), ),
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
backgroundColor: bgrColor, backgroundColor: bgrColor,
icon: new Icon(Icons.featured_play_list, color: inactive), icon: Icon(Icons.featured_play_list, color: inactive),
activeIcon: new Icon( activeIcon: Icon(
Icons.featured_play_list, Icons.featured_play_list,
color: active, color: active,
), ),
title: new Text( title: Text(
t("My Training Plan"), t("My Training Plan"),
style: TextStyle(fontSize: 12), style: TextStyle(fontSize: 12),
), ),
@ -87,7 +76,7 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
icon: Common.badgedIcon(inactive, Icons.person, "account"), icon: Common.badgedIcon(inactive, Icons.person, "account"),
activeIcon: Common.badgedIcon(active, Icons.person, "account"), activeIcon: Common.badgedIcon(active, Icons.person, "account"),
title: Text( title: Text(
AppLocalizations.of(context).translate("Account"), t("Account"),
style: TextStyle(fontSize: 12), style: TextStyle(fontSize: 12),
)), )),
BottomNavigationBarItem( BottomNavigationBarItem(
@ -95,11 +84,6 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
icon: Icon(Icons.settings, color: inactive), icon: Icon(Icons.settings, color: inactive),
activeIcon: Icon(Icons.settings, color: active), activeIcon: Icon(Icons.settings, color: active),
title: Text(t("Settings"), style: TextStyle(fontSize: 12))), title: Text(t("Settings"), style: TextStyle(fontSize: 12))),
/* BottomNavigationBarItem(
backgroundColor: bgrColor,
icon: Icon(Icons.multiple_stop, color: inactive),
activeIcon: Icon(Icons.multiple_stop, color: active),
title: Text(t("Multi test"), style: TextStyle(fontSize: 12))) */
], ],
onTap: (index) { onTap: (index) {
setState(() { setState(() {

View File

@ -231,7 +231,7 @@ class _ExerciseSaveState extends State<ExerciseSave> with Trans {
Divider( Divider(
color: Colors.transparent, color: Colors.transparent,
), ),
FlatButton( /* FlatButton(
onPressed: () { onPressed: () {
widget.onSubmit(); widget.onSubmit();
/* showDialog( /* showDialog(
@ -251,7 +251,7 @@ class _ExerciseSaveState extends State<ExerciseSave> with Trans {
style: TextStyle(fontSize: 16, color: Colors.white), style: TextStyle(fontSize: 16, color: Colors.white),
), ),
], ],
)), )), */
]), ]),
))); )));
} }

View File

@ -114,8 +114,8 @@ class ImageButton extends StatelessWidget {
: GestureDetector( : GestureDetector(
child: Image.asset( child: Image.asset(
'asset/image/lock.png', 'asset/image/lock.png',
height: 150, height: 50,
width: 150, width: 50,
), ),
onTap: onTap ?? onTap, onTap: onTap ?? onTap,
)) ))

View File

@ -53,7 +53,7 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
} }
}); });
animation.addListener(() { animation.addListener(() {
setState(() {}); //setState(() {});
}); });
} }
@ -65,6 +65,13 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
super.initState(); super.initState();
} }
@override
bool didUpdateWidget(MenuPageWidget oldWidget) {
super.didUpdateWidget(oldWidget);
scrollController.animateTo(40, duration: Duration(milliseconds: 300), curve: Curves.easeIn);
return true;
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
menuBloc = BlocProvider.of<MenuBloc>(context); menuBloc = BlocProvider.of<MenuBloc>(context);
@ -247,10 +254,10 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
SliverGrid sliverList = SliverGrid( SliverGrid sliverList = SliverGrid(
delegate: SliverChildListDelegate(list), delegate: SliverChildListDelegate(list),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, crossAxisCount: 4,
mainAxisSpacing: 1.0, mainAxisSpacing: 1.5,
crossAxisSpacing: 1.0, crossAxisSpacing: 1.5,
childAspectRatio: 3, childAspectRatio: 2.5,
)); ));
return sliverList; return sliverList;
} }

View File

@ -985,6 +985,13 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.99" version: "0.0.99"
smartlook:
dependency: "direct main"
description:
name: smartlook
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.6"
source_gen: source_gen:
dependency: transitive dependency: transitive
description: description:

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.10+60 version: 1.1.10+61
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -54,6 +54,10 @@ dependencies:
audioplayer: ^0.8.1 audioplayer: ^0.8.1
ezanimation: ^0.4.1 ezanimation: ^0.4.1
confetti: ^0.5.5 confetti: ^0.5.5
crypto: ^2.1.5
transparent_image: ^1.0.0
#auto_animated: ^2.1.0
carousel_slider: ^3.0.0
firebase_core: ^0.5.0 firebase_core: ^0.5.0
@ -63,11 +67,8 @@ dependencies:
flutter_facebook_auth: ^2.0.0+1 flutter_facebook_auth: ^2.0.0+1
google_sign_in: ^4.5.9 google_sign_in: ^4.5.9
apple_sign_in: ^0.1.0 apple_sign_in: ^0.1.0
crypto: ^2.1.5
transparent_image: ^1.0.0 smartlook: ^1.0.6
#auto_animated: ^2.1.0
carousel_slider: ^3.0.0
flurry: ^0.0.7 flurry: ^0.0.7
animated_widgets: ^1.0.6 animated_widgets: ^1.0.6
@ -288,6 +289,7 @@ flutter:
- asset/menu/incline_press.jpg - asset/menu/incline_press.jpg
- asset/menu/incline_pushups.jpg - asset/menu/incline_pushups.jpg
- asset/menu/incline_triceps_extension.jpg - asset/menu/incline_triceps_extension.jpg
- asset/menu/leg_abductor.jpg
- asset/menu/leg_curls.jpg - asset/menu/leg_curls.jpg
- asset/menu/leg_extension.jpg - asset/menu/leg_extension.jpg
- asset/menu/legpress.jpg - asset/menu/legpress.jpg