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",
"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!",
"Do you want to override it?":"Do you want to override it?",
"Press OK to continue":"Press OK to continue",
"Continue":"Continue",
" 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",
"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!",
"Do you want to override it?":"Felülírod?",
"Press OK to continue":"Nyomd meg az OK-t a folytatáshoz",
"Continue":"Folytatsd",
" your ":": ",

View File

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

View File

@ -1,2 +1,3 @@
#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 "Generated.xcconfig"
#include "./Generated.xcconfig"
IPHONEOS_DEPLOYMENT_TARGET = 12.0

View File

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

View File

@ -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 = (

View File

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

View File

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

View File

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

View File

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

View File

@ -94,6 +94,7 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
yield ExerciseNewReady();
} else if (event is ExerciseNewQuantityUnitChange) {
yield ExerciseNewLoading();
log("Event quantityUnit " + event.quantity.toStringAsFixed(0));
exerciseRepository.setUnitQuantity(event.quantity);
unitQuantity = event.quantity;
yield ExerciseNewReady();
@ -147,7 +148,7 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
yield ExerciseNewLoading();
exerciseRepository.end = DateTime.now();
await exerciseRepository.addExercise();
exerciseRepository.initExercise();
// exerciseRepository.initExercise();
menuBloc.add(MenuTreeDown(parent: 0));
Cache().initBadges();
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/repository/customer_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/enums.dart';
import 'package:aitrainer_app/util/track.dart';
@ -25,12 +23,7 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
final bool isRegistration;
bool dataPolicyAllowed = false;
bool obscure = true;
LoginBloc({this.accountBloc, this.userRepository, this.context, this.isRegistration}) : super(LoginInitial()) {
if (isRegistration) {
ExerciseTreeApi().getExerciseTree();
ExerciseTypeApi().getExerciseTypes();
}
}
LoginBloc({this.accountBloc, this.userRepository, this.context, this.isRegistration}) : super(LoginInitial());
@override
Stream<LoginState> mapEventToState(

View File

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

View File

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

View File

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

View File

@ -52,3 +52,7 @@ class TestSetExecuteDeleteExercise extends TestSetExecuteEvent {
class TestSetExecuteDeleteActive extends TestSetExecuteEvent {
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:google_fonts/google_fonts.dart';
import 'package:sentry/sentry.dart';
import 'package:smartlook/smartlook.dart';
import 'bloc/account/account_bloc.dart';
import 'bloc/body_development/body_development_bloc.dart';
import 'bloc/development_by_muscle/development_by_muscle_bloc.dart';
@ -165,7 +166,18 @@ Future<Null> main() async {
}
Future<void> initFlurry() async {
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 {

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/logging.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/env.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:aitrainer_app/model/exercise_type.dart';
import 'package:intl/intl.dart';
import 'package:smartlook/smartlook.dart';
import 'customer_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 activeExercisePlanDateKey = 'active_exercise_plan_date';
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 final String mediaUrl = 'https://aitrainer.info:4343/media/';
@ -111,7 +115,6 @@ class Cache with Logging {
Customer _trainee;
List<Exercise> _exercisesTrainee;
ExercisePlan _traineeExercisePlan;
List<ExercisePlanDetail> _traineeExercisesPlanDetail;
LinkedHashMap<String, int> _badges = LinkedHashMap();
@ -120,6 +123,8 @@ class Cache with Logging {
String testEnvironment;
bool liveServer = true;
bool hasHardware = false;
bool isExerciseLogSeen = false;
bool isMuscleDevelopmentSeen = false;
factory Cache() {
return _singleton;
@ -246,10 +251,14 @@ class Cache with Logging {
void setServerAddress(SharedPreferences prefs) {
if (this.testEnvironment == "1") {
baseUrl = 'http://aitrainer.app:8899/api/';
print("TestEnv $baseUrl");
return;
}
final bool live = prefs.getBool(Cache.serverKey);
if (live == null) {
baseUrl = 'http://aitrainer.app:8888/api/';
print("Live Env $baseUrl");
liveServer = true;
return;
}
liveServer = live;
@ -258,6 +267,8 @@ class Cache with Logging {
} else {
baseUrl = 'http://aitrainer.app:8899/api/';
}
print("Env $baseUrl");
}
Future<void> setLoginTypeFromPrefs() async {
@ -364,7 +375,7 @@ class Cache with Logging {
sharedPreferences.setString(Cache.firebaseUidKey, null);
sharedPreferences.setString(authTokenKey, "");
}
await initBadges();
initBadges();
}
void setExerciseTypes(List<ExerciseType> exerciseTypes) {
@ -487,13 +498,14 @@ class Cache with Logging {
}
}
Future<void> initBadges() async {
void initBadges() async {
CustomerRepository customerRepository = CustomerRepository();
_badges = LinkedHashMap();
customerRepository.setCustomer(userLoggedIn);
int _ecto = customerRepository.getCustomerPropertyValue(PropertyEnum.Ectomorph.toStr()).toInt();
int _mezo = customerRepository.getCustomerPropertyValue(PropertyEnum.Mesomorph.toStr()).toInt();
int _endo = customerRepository.getCustomerPropertyValue(PropertyEnum.Endomorph.toStr()).toInt();
//print("endo " + _endo.toString() + " mezo " + _mezo.toString());
if (this.userLoggedIn != null) {
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) {
setBadge("home", true);
setBadge("Strength", true);
setBadge("Muscle Build / Shape Toning", true);
setBadge("Cardio", true);
}
if (customerRepository.getHeight() == 0) {
@ -541,6 +553,16 @@ class Cache with Logging {
setBadge("FitnessLevel", 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());
}
@ -557,12 +579,18 @@ class Cache with Logging {
Future<void> initCustomer(int customerId) async {
log(" *** initCustomer");
await PackageApi().getCustomerPackage(customerId);
if (!isInDebugMode) {
Flurry.setUserId(customerId.toString());
Smartlook.setUserIdentifier(customerId.toString());
Track().track(TrackingEvent.enter);
}
await setLoginTypeFromPrefs();
await getActiveExercisePlan();
await isExerciseLogSeenPrefs();
await isMuscleDevelopmentSeenPrefs();
Cache().startPage = "home";
Track().track(TrackingEvent.enter);
}
AccessToken get getAccessTokenFacebook => accessTokenFacebook;
@ -573,4 +601,39 @@ class Cache with Logging {
List get exercisePlanTemplates => this._exercisePlanTemplates;
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 {
int exercisePlanTemplateId;
String name;
@ -12,9 +16,11 @@ class ExercisePlanTemplate {
this.name = json['name'];
this.description = json['description'];
this.templateType = json['templateType'];
this.nameTranslation = json['translations'] != null && (json['translations']).length > 0 ? json['translations'][0]['name'] : this.name;
this.descriptionTranslation =
json['translations'] != null && (json['translations']).length > 0 ? json['translations'][0]['description'] : this.description;
if (json['translations'].length > 0) {
this.nameTranslation = AppLanguage().appLocal == Locale('hu') ? json['translations'][0]['name'] : json['name'];
this.descriptionTranslation = AppLanguage().appLocal == Locale('hu') ? json['translations'][0]['description'] : json['description'];
}
if (json['details'] != null && (json['details']).length > 0) {
List details = json['details'];
details.forEach((element) {

View File

@ -27,7 +27,13 @@ class ExerciseDeviceRepository {
}
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() {

View File

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

View File

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

View File

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

View File

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

View File

@ -113,8 +113,11 @@ mixin Common {
}
static Widget badgedIcon(Color color, IconData icon, String badgeKey) {
bool show = Cache().getBadges()[badgeKey] != null;
int counter = Cache().getBadges()[badgeKey] != null ? Cache().getBadges()[badgeKey] : 0;
//print("BadgetIcon: " + Cache().getBadges().toString());
int badgeValue = Cache().getBadges()[badgeKey];
bool show = (badgeValue != null);
int counter = show ? badgeValue : 0;
//print("show $show BadgeKey $badgeKey count $counter");
return Badge(
position: BadgePosition.topEnd(top: -10, end: -10),
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:flurry/flurry.dart';
import 'package:aitrainer_app/model/tracking.dart' as model;
import 'package:smartlook/smartlook.dart';
class Track with Logging {
static final Track _singleton = Track._internal();
@ -18,6 +19,7 @@ class Track with Logging {
void track(TrackingEvent event, {String eventValue = ""}) {
if (!isInDebugMode) {
Flurry.logEvent(event.toString());
Smartlook.setGlobalEventProperty(event.toString(), eventValue, false);
model.Tracking tracking = model.Tracking();
tracking.customerId = Cache().userLoggedIn.customerId;
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) {
exerciseRepository.exerciseList = exerciseRepository.getExerciseListTrainee();
}
//print("ExerciseList ${exerciseRepository.exerciseList}");
exerciseRepository.sortByDate();
List<Widget> listWidget = List();
@ -146,6 +147,7 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
origDate = exerciseDate;
}
});
//print("ListExerices $listExercises");
if (listExercises.length > 0) {
listWidget.add(Container(
margin: const EdgeInsets.only(left: 4.0),
@ -194,28 +196,13 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
exercise.summary == null ? "" : exercise.summary,
style: TextStyle(fontSize: 12, color: Colors.blue[800]),
)),
Stack(
children: [
IconButton(
iconSize: 36,
icon: Icon(CustomIcon.heart_1, color: Colors.blue[800]),
icon: Icon(CustomIcon.heart_1, color: Colors.orange[800]),
onPressed: () {
evaluation(exerciseRepository, exercise);
},
),
Cache().hasPurchased
? Offstage()
: GestureDetector(
child: Image.asset(
'asset/image/lock.png',
height: 25,
width: 25,
),
onTap: () {
evaluation(exerciseRepository, exercise);
}),
],
),
IconButton(
icon: Icon(Icons.delete, color: Colors.black12),
onPressed: () {
@ -295,7 +282,25 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
),
FlatButton(
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/menu/menu_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/exercise_ability.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/material.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';
class ExerciseNewPage extends StatefulWidget {
@ -115,9 +117,18 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
exerciseBloc.add(ExerciseNewQuantityChange(quantity: double.parse(value)));
},
onUnitQuantityChanged: (value) => exerciseBloc.add(ExerciseNewQuantityUnitChange(quantity: double.parse(value))),
onSubmit: () => confirmationDialog(exerciseBloc, menuBloc),
//onSubmit: () => confirmationDialog(exerciseBloc, menuBloc),
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(
isSet: false,
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) {
return;
}
@ -173,17 +195,49 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
),
FlatButton(
child: Text(t("Yes")),
onPressed: () => {
bloc.exerciseRepository.setCustomer(Cache().userLoggedIn),
bloc.add(ExerciseNewSubmit()),
Navigator.pop(context),
if (executeBloc.existsActivePlan() == true)
{
onPressed: () {
saveAll(bloc);
if (executeBloc.existsActivePlan() == true) {
executeBloc.add(TestSetExecuteExerciseFinished(
exerciseTypeId: bloc.exerciseRepository.exerciseType.exerciseTypeId,
quantity: bloc.exerciseRepository.exercise.quantity,
unitQuantity: bloc.exerciseRepository.exercise.unitQuantity)),
unitQuantity: bloc.exerciseRepository.exercise.unitQuantity));
}
Navigator.pop(context);
},
)
],
));
}
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/track.dart';
import 'package:aitrainer_app/widgets/dialog_premium.dart';
import 'package:badges/badges.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:aitrainer_app/util/trans.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 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(
appBar: AppBarNav(depth: 0),
body: Container(
@ -43,7 +49,19 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
child: CustomScrollView(scrollDirection: Axis.vertical, slivers: [
SliverGrid(
delegate: SliverChildListDelegate([
ImageButton(
Badge(
padding: EdgeInsets.all(8),
position: BadgePosition.topEnd(top: -5, end: -3),
animationDuration: Duration(milliseconds: 500),
animationType: BadgeAnimationType.slide,
badgeColor: Colors.red,
showBadge: showExerciseLogBadge,
badgeContent: Text(counterExerciseLogBadge.toString(),
style: TextStyle(
color: Colors.white,
fontSize: 16,
)),
child: ImageButton(
width: imageWidth,
textAlignment: Alignment.topCenter,
text: t("My Exercise Logs"),
@ -57,7 +75,7 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
left: 5,
onTap: () => this.callBackExerciseLog(exerciseRepository, customerRepository),
isLocked: false,
),
)),
ImageButton(
width: imageWidth,
textAlignment: Alignment.topLeft,
@ -96,7 +114,19 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
},
isLocked: true,
), */
ImageButton(
Badge(
padding: EdgeInsets.all(8),
position: BadgePosition.topEnd(top: -5, end: -3),
animationDuration: Duration(milliseconds: 500),
animationType: BadgeAnimationType.slide,
badgeColor: Colors.red,
showBadge: showMuscleDevelopmentBadge,
badgeContent: Text(counterMuscleDevelopmentBadge.toString(),
style: TextStyle(
color: Colors.white,
fontSize: 16,
)),
child: ImageButton(
width: imageWidth,
textAlignment: Alignment.topLeft,
text: t("Development Of Muscles"),
@ -110,7 +140,7 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
left: 5,
onTap: () => {Navigator.of(context).pushNamed('mydevelopmentMusclePage', arguments: args)},
isLocked: true,
),
)),
ImageButton(
width: imageWidth,
left: 5,

View File

@ -86,6 +86,7 @@ class SettingsPage extends StatelessWidget with Trans {
title: Container(),
);
}
print("Live: ${Cache().liveServer}");
return ListTile(
leading: Icon(Icons.data_usage_sharp),
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,
builder: (BuildContext context) {
return DialogCommon(
title: "Own Body",
descriptions: t("execute these exercises with maximum repeats. Leave at least 3 min rest time between time"),
title: bloc.templateNameTranslation,
descriptions: bloc.templateDescription,
text: "OK",
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
@ -182,7 +182,9 @@ class TestSetEdit extends StatelessWidget with Trans {
}
alternatives.forEach((element) {
if (workoutTree.exerciseTypeId != element.exerciseTypeId) {
list.add(getImageStack(element, menuBloc, bloc));
}
});
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_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_type.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:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:modal_progress_hud/modal_progress_hud.dart';
// 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(
isSet: executeBloc.miniTestSet == true,
exerciseTypeId: exerciseType.exerciseTypeId,
@ -87,9 +101,10 @@ class TestSetNew extends StatelessWidget with Trans {
},
onUnitQuantityChanged: (value) => bloc.add(TestSetNewChangeQuantityUnit(quantity: double.parse(value))),
exerciseTypeId: bloc.exerciseType.exerciseTypeId,
onSubmit: () {
/* onSubmit: () {
Navigator.of(context).pop();
bloc.add(TestSetNewSubmit());
});
} */
);
}
}

View File

@ -143,7 +143,7 @@ class _AppBarNav extends State<AppBarNav> with SingleTickerProviderStateMixin, C
Widget getAnimatedWidget() {
double cWidth = mediaSizeWidth(context);
double percent = Cache().getPercentExercises();
if (percent == -1) {
if (percent == -1 || percent.isNaN) {
menuBloc.menuTreeRepository.createTree();
ExerciseRepository exerciseRepository = ExerciseRepository();
exerciseRepository.getBaseExerciseFinishedPercent();
@ -152,7 +152,7 @@ class _AppBarNav extends State<AppBarNav> with SingleTickerProviderStateMixin, C
percent = 0;
}
}
if (percent == null) {
if (percent == null || percent.isNaN) {
percent = 0;
}
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/util/app_localization.dart';
import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/service/logging.dart';
import 'package:aitrainer_app/util/common.dart';
@ -25,13 +24,6 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
super.initState();
}
@override
void didUpdateWidget(BottomNavigator oldWidget) {
Cache().initBadges();
super.didUpdateWidget(oldWidget);
}
@override
void didChangeDependencies() {
Cache().initBadges();
@ -56,28 +48,25 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
backgroundColor: bgrColor,
icon: Common.badgedIcon(inactive, 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(
backgroundColor: bgrColor,
icon: new Icon(Icons.trending_up, color: inactive),
activeIcon: new Icon(
Icons.trending_up,
color: active,
),
title: new Text(
icon: Common.badgedIcon(inactive, Icons.trending_up, "development"),
activeIcon: Common.badgedIcon(active, Icons.trending_up, "development"),
title: Text(
t("My Development"),
style: TextStyle(fontSize: 12),
),
),
BottomNavigationBarItem(
backgroundColor: bgrColor,
icon: new Icon(Icons.featured_play_list, color: inactive),
activeIcon: new Icon(
icon: Icon(Icons.featured_play_list, color: inactive),
activeIcon: Icon(
Icons.featured_play_list,
color: active,
),
title: new Text(
title: Text(
t("My Training Plan"),
style: TextStyle(fontSize: 12),
),
@ -87,7 +76,7 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
icon: Common.badgedIcon(inactive, Icons.person, "account"),
activeIcon: Common.badgedIcon(active, Icons.person, "account"),
title: Text(
AppLocalizations.of(context).translate("Account"),
t("Account"),
style: TextStyle(fontSize: 12),
)),
BottomNavigationBarItem(
@ -95,11 +84,6 @@ class _NawDrawerWidget extends State<BottomNavigator> with Trans, Logging {
icon: Icon(Icons.settings, color: inactive),
activeIcon: Icon(Icons.settings, color: active),
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) {
setState(() {

View File

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

View File

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

View File

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

View File

@ -985,6 +985,13 @@ packages:
description: flutter
source: sdk
version: "0.0.99"
smartlook:
dependency: "direct main"
description:
name: smartlook
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.6"
source_gen:
dependency: transitive
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.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.10+60
version: 1.1.10+61
environment:
sdk: ">=2.7.0 <3.0.0"
@ -54,6 +54,10 @@ dependencies:
audioplayer: ^0.8.1
ezanimation: ^0.4.1
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
@ -63,11 +67,8 @@ dependencies:
flutter_facebook_auth: ^2.0.0+1
google_sign_in: ^4.5.9
apple_sign_in: ^0.1.0
crypto: ^2.1.5
transparent_image: ^1.0.0
#auto_animated: ^2.1.0
carousel_slider: ^3.0.0
smartlook: ^1.0.6
flurry: ^0.0.7
animated_widgets: ^1.0.6
@ -288,6 +289,7 @@ flutter:
- asset/menu/incline_press.jpg
- asset/menu/incline_pushups.jpg
- asset/menu/incline_triceps_extension.jpg
- asset/menu/leg_abductor.jpg
- asset/menu/leg_curls.jpg
- asset/menu/leg_extension.jpg
- asset/menu/legpress.jpg