WT 1.1.24+7 traning plan fixes

This commit is contained in:
bossanyit 2021-11-08 21:48:55 +01:00
parent 4c5aff91db
commit 0496f96da6
13 changed files with 295 additions and 256 deletions

View File

@ -33,7 +33,7 @@ if (keystorePropertiesFile.exists()) {
}
android {
compileSdkVersion 28
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -46,7 +46,7 @@ android {
defaultConfig {
applicationId "com.aitrainer.aitrainer_app"
minSdkVersion 20
targetSdkVersion 29
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
@ -75,9 +75,11 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics:18.0.0'
implementation 'com.google.firebase:firebase-analytics:20.0.0'
implementation 'com.facebook.android:facebook-login:5.15.3'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-core:20.0.0'
implementation 'com.google.firebase:firebase-inappmessaging-display:20.1.1'
}
sourceCompatibility = '1.8'

View File

@ -27,12 +27,13 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!-- Deep Links -->
<intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with YOUR_SCHEME://YOUR_HOST -->
<data android:scheme="https" android:host="aitrainer.page.link" />
<data android:scheme="http" android:host="aitrainer.page.link" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.

View File

@ -25,117 +25,117 @@ PODS:
- FBSDKLoginKit/Login (11.2.1):
- FBSDKCoreKit (~> 11.2.1)
- FBSDKCoreKit_Basics (~> 11.2.1)
- Firebase/Analytics (8.7.0):
- Firebase/Analytics (8.9.0):
- Firebase/Core
- Firebase/Auth (8.7.0):
- Firebase/Auth (8.9.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 8.7.0)
- Firebase/Core (8.7.0):
- FirebaseAuth (~> 8.9.0)
- Firebase/Core (8.9.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 8.7.0)
- Firebase/CoreOnly (8.7.0):
- FirebaseCore (= 8.7.0)
- Firebase/DynamicLinks (8.7.0):
- FirebaseAnalytics (~> 8.9.0)
- Firebase/CoreOnly (8.9.0):
- FirebaseCore (= 8.9.0)
- Firebase/DynamicLinks (8.9.0):
- Firebase/CoreOnly
- FirebaseDynamicLinks (~> 8.7.0)
- Firebase/InAppMessaging (8.7.0):
- FirebaseDynamicLinks (~> 8.9.0)
- Firebase/InAppMessaging (8.9.0):
- Firebase/CoreOnly
- FirebaseInAppMessaging (~> 8.7.0-beta)
- Firebase/Messaging (8.7.0):
- FirebaseInAppMessaging (~> 8.9.0-beta)
- Firebase/Messaging (8.9.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 8.7.0)
- Firebase/RemoteConfig (8.7.0):
- FirebaseMessaging (~> 8.9.0)
- Firebase/RemoteConfig (8.9.0):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 8.7.0)
- FirebaseRemoteConfig (~> 8.9.0)
- firebase_analytics (8.3.3):
- Firebase/Analytics (= 8.7.0)
- Firebase/Analytics (= 8.9.0)
- firebase_core
- Flutter
- firebase_auth (3.1.2):
- Firebase/Auth (= 8.7.0)
- Firebase/Auth (= 8.9.0)
- firebase_core
- Flutter
- firebase_core (1.7.0):
- Firebase/CoreOnly (= 8.7.0)
- firebase_core (1.10.0):
- Firebase/CoreOnly (= 8.9.0)
- Flutter
- firebase_dynamic_links (2.0.10):
- Firebase/DynamicLinks (= 8.7.0)
- Firebase/DynamicLinks (= 8.9.0)
- firebase_core
- Flutter
- firebase_in_app_messaging (0.5.0-10):
- Firebase/InAppMessaging (= 8.7.0)
- firebase_in_app_messaging (0.5.0-13):
- Firebase/InAppMessaging (= 8.9.0)
- firebase_core
- Flutter
- firebase_messaging (10.0.8):
- Firebase/Messaging (= 8.7.0)
- Firebase/Messaging (= 8.9.0)
- firebase_core
- Flutter
- firebase_remote_config (0.10.0-5):
- Firebase/RemoteConfig (= 8.7.0)
- Firebase/RemoteConfig (= 8.9.0)
- firebase_core
- Flutter
- FirebaseABTesting (8.8.0):
- FirebaseABTesting (8.9.0):
- FirebaseCore (~> 8.0)
- FirebaseAnalytics (8.7.0):
- FirebaseAnalytics/AdIdSupport (= 8.7.0)
- FirebaseAnalytics (8.9.1):
- FirebaseAnalytics/AdIdSupport (= 8.9.1)
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/MethodSwizzler (~> 7.6)
- GoogleUtilities/Network (~> 7.6)
- "GoogleUtilities/NSData+zlib (~> 7.6)"
- nanopb (~> 2.30908.0)
- FirebaseAnalytics/AdIdSupport (8.7.0):
- FirebaseAnalytics/AdIdSupport (8.9.1):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleAppMeasurement (= 8.7.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- GoogleAppMeasurement (= 8.9.1)
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/MethodSwizzler (~> 7.6)
- GoogleUtilities/Network (~> 7.6)
- "GoogleUtilities/NSData+zlib (~> 7.6)"
- nanopb (~> 2.30908.0)
- FirebaseAuth (8.7.0):
- FirebaseAuth (8.9.0):
- FirebaseCore (~> 8.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/Environment (~> 7.6)
- GTMSessionFetcher/Core (~> 1.5)
- FirebaseCore (8.7.0):
- FirebaseCore (8.9.0):
- FirebaseCoreDiagnostics (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- FirebaseCoreDiagnostics (8.8.0):
- GoogleDataTransport (~> 9.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- GoogleUtilities/Environment (~> 7.6)
- GoogleUtilities/Logger (~> 7.6)
- FirebaseCoreDiagnostics (8.9.0):
- GoogleDataTransport (~> 9.1)
- GoogleUtilities/Environment (~> 7.6)
- GoogleUtilities/Logger (~> 7.6)
- nanopb (~> 2.30908.0)
- FirebaseDynamicLinks (8.7.0):
- FirebaseDynamicLinks (8.9.0):
- FirebaseCore (~> 8.0)
- FirebaseInAppMessaging (8.7.0-beta):
- FirebaseInAppMessaging (8.9.0-beta):
- FirebaseABTesting (~> 8.0)
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Environment (~> 7.6)
- nanopb (~> 2.30908.0)
- FirebaseInstallations (8.8.0):
- FirebaseInstallations (8.9.0):
- FirebaseCore (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/UserDefaults (~> 7.4)
- GoogleUtilities/Environment (~> 7.6)
- GoogleUtilities/UserDefaults (~> 7.6)
- PromisesObjC (< 3.0, >= 1.2)
- FirebaseMessaging (8.7.0):
- FirebaseMessaging (8.9.0):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleDataTransport (~> 9.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Reachability (~> 7.4)
- GoogleUtilities/UserDefaults (~> 7.4)
- GoogleDataTransport (~> 9.1)
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/Environment (~> 7.6)
- GoogleUtilities/Reachability (~> 7.6)
- GoogleUtilities/UserDefaults (~> 7.6)
- nanopb (~> 2.30908.0)
- FirebaseRemoteConfig (8.7.0):
- FirebaseRemoteConfig (8.9.0):
- FirebaseABTesting (~> 8.0)
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- GoogleUtilities/Environment (~> 7.6)
- "GoogleUtilities/NSData+zlib (~> 7.6)"
- Flutter (1.0.0)
- flutter_app_badger (0.0.1):
- Flutter
@ -154,20 +154,27 @@ PODS:
- google_sign_in (0.0.1):
- Flutter
- GoogleSignIn (~> 5.0)
- GoogleAppMeasurement (8.7.0):
- GoogleAppMeasurement/AdIdSupport (= 8.7.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- GoogleAppMeasurement (8.9.1):
- GoogleAppMeasurement/AdIdSupport (= 8.9.1)
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/MethodSwizzler (~> 7.6)
- GoogleUtilities/Network (~> 7.6)
- "GoogleUtilities/NSData+zlib (~> 7.6)"
- nanopb (~> 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (8.7.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- GoogleAppMeasurement/AdIdSupport (8.9.1):
- GoogleAppMeasurement/WithoutAdIdSupport (= 8.9.1)
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/MethodSwizzler (~> 7.6)
- GoogleUtilities/Network (~> 7.6)
- "GoogleUtilities/NSData+zlib (~> 7.6)"
- nanopb (~> 2.30908.0)
- GoogleDataTransport (9.1.0):
- GoogleAppMeasurement/WithoutAdIdSupport (8.9.1):
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/MethodSwizzler (~> 7.6)
- GoogleUtilities/Network (~> 7.6)
- "GoogleUtilities/NSData+zlib (~> 7.6)"
- nanopb (~> 2.30908.0)
- GoogleDataTransport (9.1.2):
- GoogleUtilities/Environment (~> 7.2)
- nanopb (~> 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
@ -175,24 +182,24 @@ PODS:
- AppAuth (~> 1.2)
- GTMAppAuth (~> 1.0)
- GTMSessionFetcher/Core (~> 1.1)
- GoogleUtilities/AppDelegateSwizzler (7.5.2):
- GoogleUtilities/AppDelegateSwizzler (7.6.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.5.2):
- GoogleUtilities/Environment (7.6.0):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.5.2):
- GoogleUtilities/Logger (7.6.0):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (7.5.2):
- GoogleUtilities/MethodSwizzler (7.6.0):
- GoogleUtilities/Logger
- GoogleUtilities/Network (7.5.2):
- GoogleUtilities/Network (7.6.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.5.2)"
- GoogleUtilities/Reachability (7.5.2):
- "GoogleUtilities/NSData+zlib (7.6.0)"
- GoogleUtilities/Reachability (7.6.0):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.5.2):
- GoogleUtilities/UserDefaults (7.6.0):
- GoogleUtilities/Logger
- GTMAppAuth (1.2.2):
- AppAuth/Core (~> 1.4)
@ -240,7 +247,7 @@ PODS:
- FMDB (>= 2.7.5)
- url_launcher (0.0.1):
- Flutter
- UXCam (3.3.7)
- UXCam (3.3.9)
- video_player (0.0.1):
- Flutter
- wakelock (0.0.1):
@ -383,24 +390,24 @@ SPEC CHECKSUMS:
FBSDKCoreKit: bf655f808b040ed66a72b9922911b39d703e64f4
FBSDKCoreKit_Basics: 73ebe3a27eb688ac5b5aa7e99f68992993042115
FBSDKLoginKit: 2e76831ef08d356b8f9150ea51cce865074ea304
Firebase: bc9325d5ee2041524bac78a5213d0e530c651309
firebase_analytics: 72e3c5d712e43eeb0cb6f194f7cc10bc81e7d3fe
firebase_auth: 3193124aa14a62b8abec3fd069df73ef378d2c5b
firebase_core: f5ac1f2726a2bd0468cea0161eddeea3d83d7e3e
firebase_dynamic_links: 3c5f941aee6d2364c59e0ccb97218f55733a535c
firebase_in_app_messaging: 28508aa171a3032569910af896ca98a32cdfc827
firebase_messaging: cfee8830477d2f1875e027a65cce7f6239ebf583
firebase_remote_config: 1835382fd6c6de8f44a196548b5ebe317726ff3e
FirebaseABTesting: 981336dd14d84787e33466e4247f77ec2343f8d9
FirebaseAnalytics: 52768800c2add1d84b751420cb4caaf8195f2c41
FirebaseAuth: 2e7d029977648c67a5d51a263d4cbab76d34cf12
FirebaseCore: f4804c1d3f4bbbefc88904d15653038f2c99ddf7
FirebaseCoreDiagnostics: fe77f42da6329d6d83d21fd9d621a6b704413bfc
FirebaseDynamicLinks: e3fd315f43196811df8eac95803f10ff47c3b026
FirebaseInAppMessaging: d1cff11faa69d294bef9c0773b91a6c84f771ac5
FirebaseInstallations: 2563cb18a723ef9c6ef18318a49519b75dce613c
FirebaseMessaging: 93227dd71d7888e200baef65043f81acb2b6596e
FirebaseRemoteConfig: 34300dd83055c06e2768d0932dd8fb2c1575745f
Firebase: 13d8d96499e2635428d5bf0ec675df21f95d9a95
firebase_analytics: b4b760056b69bcb2bf0ebbbb8cf6f969921a86fe
firebase_auth: 45e41687f7d88ce8016c1f411320911b842245d7
firebase_core: f770e033e790657b3505f04be4cb24c482912f11
firebase_dynamic_links: db82b85aee9c6066de135cdb4bee41e5b9e281ac
firebase_in_app_messaging: 180fcaea83c2c0555c5c0243bc9dc2c3b3358b2a
firebase_messaging: 51b1029537c74503e935e4ccb221da8be8cbf26e
firebase_remote_config: 2a43c3a6d3430fedb4f9f7360acc757d4d962bff
FirebaseABTesting: 9de50b34bf9eb4a07d4edb7af82c14152fd905aa
FirebaseAnalytics: 4ab446ce08a3fe52e8a4303dd997cf26276bf968
FirebaseAuth: 2b78b2a32c07b3ecfa4970bdf1d3632b8304099b
FirebaseCore: 599ee609343eaf4941bd188f85e3aa077ffe325b
FirebaseCoreDiagnostics: 5daa63f1c1409d981a2d5007daa100b36eac6a34
FirebaseDynamicLinks: 50980cbe21d2bbe8374afcdccd94dc2db20dffca
FirebaseInAppMessaging: 2fc3754e9e63dd44daff52930f075525cc9a518c
FirebaseInstallations: caa7c8e0d3e2345b8829d2fa9ca1b4dfbf2fcc85
FirebaseMessaging: 82c4a48638f53f7b184f3cc9f6cd2cbe533ab316
FirebaseRemoteConfig: a75c1bd44ebd3ed4ad3fa1ff09414a8b133be405
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_app_badger: 65de4d6f0c34a891df49e6cfb8a1c0496426fa68
flutter_facebook_auth: 870a465b1afff3ace7a592bd44665d921991726c
@ -408,10 +415,10 @@ SPEC CHECKSUMS:
flutter_uxcam: 32e4e8b4355be6bf9d512ad36aed6d86c98a5cdf
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
google_sign_in: de494e5e993986afae63e22a32441e30c35c9823
GoogleAppMeasurement: 2be61ce546ad074dbe4dd545f222ac6033bb1d9e
GoogleDataTransport: 85fd18ff3019bb85d3f2c551d04c481dedf71fc9
GoogleAppMeasurement: 837649ad3987936c232f6717c5680216f6243d24
GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940
GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213
GoogleUtilities: 8de2a97a17e15b6b98e38e8770e2d129a57c0040
GoogleUtilities: 684ee790a24f73ebb2d1d966e9711c203f2a4237
GTMAppAuth: ad5c2b70b9a8689e1a04033c9369c4915bfcbe89
GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91
modal_progress_hud_nsn: f6fb744cd060653d66ed8f325360ef3650eb2fde
@ -432,7 +439,7 @@ SPEC CHECKSUMS:
smartlook: bbc5c73a85c752a31dabf100c8930838c646342e
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
UXCam: 846259f745486b5d702423c8cbedf08e2cd8eb2c
UXCam: fb294bf954e708fc308a645ae65bb967cac0760e
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
wakelock: b0843b2479edbf6504d8d262c2959446f35373aa
webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b

View File

@ -388,7 +388,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
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 = 5;
CURRENT_PROJECT_VERSION = 6;
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 = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (

View File

@ -44,6 +44,8 @@
<string>Workout Test</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string>
<key>FlutterDeepLinkingEnabled</key>
<true/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>

View File

@ -110,7 +110,7 @@ class TrainingPlanBloc extends Bloc<TrainingPlanEvent, TrainingPlanState> {
} else if (event is TrainingPlanWeightChangeRecalculate) {
yield TrainingPlanExerciseLoading();
if (event.detail.baseOneRepMax > 0) {
if (event.detail.baseOneRepMax > 0 && event.detail.repeats != -1) {
if (_myTrainingPlan == null) {
setTrainingPlanFromCache();
}
@ -642,7 +642,7 @@ class TrainingPlanBloc extends Bloc<TrainingPlanEvent, TrainingPlanState> {
final String day = dayNames[this.activeDayIndex];
CustomerTrainingPlanDetails? prev;
for (var detail in _myPlan!.days[day]!) {
print("Offset detail $detail");
//print("Offset detail $detail");
if (detail.state == ExercisePlanDetailState.inProgress || detail.state == ExercisePlanDetailState.start) {
prev = detail;
break;
@ -818,7 +818,7 @@ class TrainingPlanBloc extends Bloc<TrainingPlanEvent, TrainingPlanState> {
allFinished =
allFinished && (listDetail.exercises.length >= listDetail.set! || listDetail.state.equalsTo(ExercisePlanDetailState.skipped));
}
print("All finished: $allFinished for ${detail.exerciseTypeId}");
//print("All finished: $allFinished for ${detail.exerciseTypeId}");
return allFinished;
}
}

View File

@ -28,6 +28,7 @@ class Customer {
DateTime? trialDate;
String? firebaseRegToken;
String? lang;
int? lifeLong;
LinkedHashMap<String, CustomerProperty> properties = LinkedHashMap();
@ -67,6 +68,7 @@ class Customer {
this.fitnessLevel = json['fitnessLevel'];
this.goal = json['goal'];
this.admin = json['admin'];
this.lifeLong = json['lifeLong'];
this.trainer = json['trainer'];
this.firebaseUid = json['firebaseUid'];
@ -106,6 +108,7 @@ class Customer {
"trialDate": this.trialDate == null ? null : DateFormat('yyyy-MM-dd HH:mm:ss').format(this.trialDate!),
"firebaseRegToken": this.firebaseRegToken,
"lang": this.lang,
"lifeLong": this.lifeLong,
};
@override

View File

@ -83,6 +83,7 @@ class TrainingPlanRepository {
detail.parallel = elem.parallel;
detail.restingTime = elem.restingTime;
detail.exerciseType = Cache().getExerciseTypeById(detail.exerciseTypeId!);
detail.alternatives = Common.getExerciseTypeAlternatives(detail.exerciseTypeId);
if (elem.weight == -1) {
if (detail.exerciseType!.unitQuantityUnit != null) {
detail = getCalculatedWeightRepeats(elem.exerciseTypeId, detail);

View File

@ -48,7 +48,7 @@ class RevenueCatPurchases with Logging {
}
bool inTrial = Cache().userLoggedIn!.trialDate != null && DateTime.now().difference(Cache().userLoggedIn!.trialDate!).inDays < 10;
log("Trial mode: $inTrial date: ${Cache().userLoggedIn!.trialDate}");
if (Cache().userLoggedIn!.admin == 1 || inTrial) {
if (Cache().userLoggedIn!.admin == 1 || inTrial || Cache().userLoggedIn!.lifeLong == 1) {
Cache().hasPurchased = true;
}
}

View File

@ -198,12 +198,12 @@ class ExerciseLogPage extends StatelessWidget with Trans, Common {
child: Badge(
elevation: 0,
padding: EdgeInsets.all(0),
position: BadgePosition.topStart(top: -25, start: -25),
position: BadgePosition.topStart(top: -5, start: -10),
animationDuration: Duration(milliseconds: 1500),
animationType: BadgeAnimationType.fade,
badgeColor: Colors.transparent,
showBadge: true,
badgeContent: IconButton(
badgeContent: /* IconButton(
iconSize: 36,
onPressed: () => showDialog(
context: context,
@ -218,11 +218,12 @@ class ExerciseLogPage extends StatelessWidget with Trans, Common {
text: '',
);
}),
icon: Icon(
Icons.star,
size: 14,
color: Colors.orange[400],
)),
icon: */
Icon(
Icons.star,
size: 14,
color: Colors.orange[400],
),
child: Image.asset(
"asset/image/kupa.png",
width: 35,
@ -230,12 +231,12 @@ class ExerciseLogPage extends StatelessWidget with Trans, Common {
Badge(
elevation: 0,
padding: EdgeInsets.all(0),
position: BadgePosition.topStart(top: -18, start: -17),
position: BadgePosition.topStart(top: 2, start: 5),
animationDuration: Duration(milliseconds: 1500),
animationType: BadgeAnimationType.fade,
badgeColor: Colors.transparent,
showBadge: true,
badgeContent: IconButton(
badgeContent: /* Icon(
iconSize: 36,
onPressed: () => showDialog(
context: context,
@ -249,12 +250,12 @@ class ExerciseLogPage extends StatelessWidget with Trans, Common {
onTap: () => Navigator.of(context).pop(),
text: '',
);
}),
icon: Icon(
Icons.star,
size: 14,
color: Colors.orange[400],
)),
}), */
Icon(
Icons.star,
size: 14,
color: Colors.orange[400],
),
child: IconButton(
icon: Icon(Icons.delete, color: Colors.black12),
onPressed: () {

View File

@ -1,5 +1,5 @@
import 'dart:collection';
import 'dart:math' show pi;
import 'package:aitrainer_app/bloc/training_plan/training_plan_bloc.dart';
import 'package:aitrainer_app/library/custom_icon_icons.dart';
import 'package:aitrainer_app/model/customer_training_plan_details.dart';
@ -9,6 +9,7 @@ import 'package:aitrainer_app/util/trans.dart';
import 'package:aitrainer_app/widgets/app_bar.dart';
import 'package:aitrainer_app/widgets/dialog_common.dart';
import 'package:aitrainer_app/widgets/dialog_html.dart';
import 'package:aitrainer_app/widgets/menu_image.dart';
import 'package:badges/badges.dart';
import 'package:extended_tabs/extended_tabs.dart';
@ -510,131 +511,152 @@ class ExerciseTile extends StatelessWidget with Trans {
final CustomerTrainingPlanDetails? next = bloc.getNext();
final bool noFilter = next != null && next.exerciseTypeId == detail.exerciseTypeId;
final bool done = detail.state == ExercisePlanDetailState.finished;
final bool done = bloc.isAllDetailsSameExerciseFinished(detail); //detail.state == ExercisePlanDetailState.finished;
final int step = bloc.getStep(detail); //detail.exercises.length;
final bool buddyWarning = detail.exerciseType == null ? false : detail.exerciseType!.buddyWarning;
final bool hasAlternative = false; //detail.alternatives.length > 0;
return Container(
child: Stack(alignment: Alignment.bottomLeft, children: [
Badge(
elevation: 0,
padding: EdgeInsets.all(0),
position: BadgePosition.topEnd(top: 5, end: 5),
animationDuration: Duration(milliseconds: 1500),
animationType: BadgeAnimationType.fade,
badgeColor: Colors.transparent,
showBadge: noFilter || done,
badgeContent: IconButton(
iconSize: 40,
onPressed: () => !done ? skip() : {},
icon: Icon(
done ? CustomIcon.ok_circled : Icons.cancel,
color: done ? Colors.green[600] : Colors.red[600],
)),
child: Badge(
elevation: 0,
padding: EdgeInsets.all(0),
position: BadgePosition.topStart(top: 5, start: 5),
animationDuration: Duration(milliseconds: 1000),
animationType: BadgeAnimationType.scale,
badgeColor: Colors.transparent,
showBadge: true,
badgeContent: IconButton(
iconSize: 36,
onPressed: () => showDialog(
context: context,
builder: (BuildContext context) {
return DialogHTML(
title: detail.exerciseType!.nameTranslation,
htmlData: '<p>' + detail.exerciseType!.descriptionTranslation + '</p>');
}),
icon: Icon(
Icons.info_outline,
color: Colors.yellow[200],
)),
child: Badge(
elevation: 0,
padding: EdgeInsets.all(0),
position: BadgePosition.topEnd(top: 65, end: 1),
animationDuration: Duration(milliseconds: 500),
animationType: BadgeAnimationType.fade,
badgeColor: Colors.transparent,
showBadge: buddyWarning,
badgeContent: IconButton(
iconSize: 50,
onPressed: () => showDialog(
context: context,
builder: (BuildContext context) {
return DialogCommon(
warning: true,
text: "Warning",
descriptions: t("Attention!"),
description2: t("The safe and exact execution of this exercise you need a training buddy or a trainer"),
description3: t("Execution at your own risk!"),
onTap: () => Navigator.of(context).pop(),
onCancel: () => Navigator.of(context).pop(),
title: t('Training Buddy'),
);
}),
icon: Icon(
CustomIcon.exclamation_circle,
color: Colors.red[800],
)),
child: Column(children: [
MenuImage(
imageName: bloc.getActualImageName(detail.exerciseType!.exerciseTypeId),
workoutTreeId: bloc.getActualWorkoutTreeId(detail.exerciseType!.exerciseTypeId)!,
radius: 0,
filter: !noFilter,
),
Container(
padding: EdgeInsets.only(left: 20, top: 10, bottom: 0),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('asset/image/WT_zold.jpg'),
fit: BoxFit.cover,
alignment: Alignment.center,
),
child: Stack(alignment: Alignment.centerRight, children: [
Stack(alignment: Alignment.centerLeft, children: [
Stack(alignment: Alignment.bottomLeft, children: [
Badge(
elevation: 0,
padding: EdgeInsets.all(0),
position: BadgePosition.topEnd(top: 5, end: 5),
animationDuration: Duration(milliseconds: 1500),
animationType: BadgeAnimationType.fade,
badgeColor: Colors.transparent,
showBadge: noFilter || done,
badgeContent: IconButton(
iconSize: 40,
onPressed: () => !done ? skip() : {},
icon: Icon(
done ? CustomIcon.ok_circled : Icons.cancel,
color: done ? Colors.green[600] : Colors.red[600],
)),
child: Badge(
elevation: 0,
padding: EdgeInsets.all(0),
position: BadgePosition.topStart(top: 5, start: 5),
animationDuration: Duration(milliseconds: 1000),
animationType: BadgeAnimationType.scale,
badgeColor: Colors.transparent,
showBadge: true,
badgeContent: IconButton(
iconSize: 36,
onPressed: () => showDialog(
context: context,
builder: (BuildContext context) {
return DialogHTML(
title: detail.exerciseType!.nameTranslation,
htmlData: '<p>' + detail.exerciseType!.descriptionTranslation + '</p>');
}),
icon: Icon(
Icons.info_outline,
color: Colors.yellow[200],
)),
child: Badge(
elevation: 0,
padding: EdgeInsets.all(0),
position: BadgePosition.topEnd(top: 65, end: 1),
animationDuration: Duration(milliseconds: 500),
animationType: BadgeAnimationType.fade,
badgeColor: Colors.transparent,
showBadge: buddyWarning,
badgeContent: IconButton(
iconSize: 50,
onPressed: () => showDialog(
context: context,
builder: (BuildContext context) {
return DialogCommon(
warning: true,
text: "Warning",
descriptions: t("Attention!"),
description2: t("The safe and exact execution of this exercise you need a training buddy or a trainer"),
description3: t("Execution at your own risk!"),
onTap: () => Navigator.of(context).pop(),
onCancel: () => Navigator.of(context).pop(),
title: t('Training Buddy'),
);
}),
icon: Icon(
CustomIcon.exclamation_circle,
color: Colors.red[800],
)),
child: Column(children: [
MenuImage(
imageName: bloc.getActualImageName(detail.exerciseType!.exerciseTypeId),
workoutTreeId: bloc.getActualWorkoutTreeId(detail.exerciseType!.exerciseTypeId)!,
radius: 0,
filter: !noFilter,
),
foregroundDecoration: !noFilter
? BoxDecoration(
color: Colors.black38,
backgroundBlendMode: BlendMode.darken,
)
: null,
height: 80,
width: double.infinity,
child: getExerciseQuantities(detail, step, noFilter),
)
])))),
Container(
padding: EdgeInsets.only(left: 15, bottom: 80, right: 15),
width: double.infinity,
color: Colors.transparent,
child: Text(
detail.exerciseType!.nameTranslation,
maxLines: 3,
style: GoogleFonts.archivoBlack(
color: noFilter ? Colors.white : Colors.grey,
fontSize: 36,
height: 1.1,
shadows: <Shadow>[
Shadow(
offset: Offset(16.0, 16.0),
blurRadius: 16.0,
color: Colors.black54,
),
Shadow(
offset: Offset(16.0, 16.0),
blurRadius: 16.0,
color: Colors.black54,
),
],
Container(
padding: EdgeInsets.only(left: 20, top: 10, bottom: 0),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('asset/image/WT_zold.jpg'),
fit: BoxFit.cover,
alignment: Alignment.center,
),
),
foregroundDecoration: !noFilter
? BoxDecoration(
color: Colors.black38,
backgroundBlendMode: BlendMode.darken,
)
: null,
height: 80,
width: double.infinity,
child: getExerciseQuantities(detail, step, noFilter),
)
])))),
Container(
padding: EdgeInsets.only(left: 15, bottom: 80, right: 15),
width: double.infinity,
color: Colors.transparent,
child: Text(
detail.exerciseType!.nameTranslation,
maxLines: 3,
style: GoogleFonts.archivoBlack(
color: noFilter ? Colors.white : Colors.grey,
fontSize: 36,
height: 1.1,
shadows: <Shadow>[
Shadow(
offset: Offset(16.0, 16.0),
blurRadius: 16.0,
color: Colors.black54,
),
Shadow(
offset: Offset(16.0, 16.0),
blurRadius: 16.0,
color: Colors.black54,
),
],
),
),
),
),
]),
hasAlternative
? Image.asset(
'asset/image/alternatives_arrow.png',
height: 100,
width: 100,
)
: Offstage(),
]),
);
hasAlternative
? Transform.rotate(
angle: pi,
alignment: Alignment.center,
child: Image.asset(
'asset/image/alternatives_arrow.png',
height: 100,
width: 100,
),
)
: Offstage(),
]));
}
void skip() {

View File

@ -378,21 +378,21 @@ packages:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.10.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.1"
version: "4.1.0"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
firebase_dynamic_links:
dependency: "direct main"
description:
@ -406,7 +406,7 @@ packages:
name: firebase_in_app_messaging
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0+10"
version: "0.5.0+13"
firebase_messaging:
dependency: "direct main"
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.24+99
version: 1.1.24+101
environment:
sdk: ">=2.12.0 <3.0.0"
@ -67,7 +67,7 @@ dependencies:
firebase_auth: ^3.0.2
firebase_remote_config: ^0.10.0+4
firebase_dynamic_links: ^2.0.8
firebase_in_app_messaging: ^0.5.0+8
firebase_in_app_messaging: ^0.5.0+13
syncfusion_flutter_gauges: ^19.3.48
syncfusion_flutter_datagrid: ^19.1.63