v1.27.1 error fixes

This commit is contained in:
bossanyit 2023-01-15 11:45:30 +01:00
parent 98901f2770
commit 3f52d95bbf
10 changed files with 46 additions and 34 deletions

View File

@ -201,9 +201,9 @@ PODS:
- path_provider_ios (0.0.1):
- Flutter
- PostHog (1.4.4)
- posthog_flutter (0.0.1):
- posthog_session (0.0.1):
- Flutter
- PostHog (~> 1.0)
- PostHog (~> 1.1)
- PromisesObjC (2.1.1)
- Purchases (3.13.2):
- PurchasesCoreSwift (= 3.13.2)
@ -254,7 +254,7 @@ DEPENDENCIES:
- package_info (from `.symlinks/plugins/package_info/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- posthog_flutter (from `.symlinks/plugins/posthog_flutter/ios`)
- posthog_session (from `.symlinks/plugins/posthog_session/ios`)
- purchases_flutter (from `.symlinks/plugins/purchases_flutter/ios`)
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
- share (from `.symlinks/plugins/share/ios`)
@ -334,8 +334,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
posthog_flutter:
:path: ".symlinks/plugins/posthog_flutter/ios"
posthog_session:
:path: ".symlinks/plugins/posthog_session/ios"
purchases_flutter:
:path: ".symlinks/plugins/purchases_flutter/ios"
sentry_flutter:
@ -398,7 +398,7 @@ SPEC CHECKSUMS:
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
PostHog: 4b6321b521569092d4ef3a02238d9435dbaeb99f
posthog_flutter: e5bed2753b8c124158530724e30232998aaf9137
posthog_session: 24d7e00a2ebd7586c8e7a1789b987f3f8d6cd10a
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
Purchases: 03200de9288724e77de435000d1828601e6b8e00
purchases_flutter: cf2b742f12b7ffef6f618c7f1ba1961e652825b1

View File

@ -372,7 +372,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -389,7 +389,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.26;
MARKETING_VERSION = 1.1.27;
PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -518,7 +518,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -535,7 +535,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.26;
MARKETING_VERSION = 1.1.27;
PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -556,7 +556,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -573,7 +573,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.26;
MARKETING_VERSION = 1.1.27;
PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -220,7 +220,12 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
double getBMR() {
var date = DateTime.now();
if (weight == null || height == null || height == 0 || weight == 0) {
if (weight == null ||
height == null ||
height == 0 ||
weight == 0 ||
customerRepository.customer == null ||
customerRepository.customer!.birthYear == null) {
this.bmi = 0;
return 0;
}

View File

@ -40,10 +40,12 @@ class ImageCache with Logging {
final String imageKey = generateMd5(url + "_" + id.toString());
// get from storage
final String imageString = (await getImageAs64BaseString(id, url))!;
final String? imageString = await getImageAs64BaseString(id, url);
_images[imageKey] = imageString;
_imageMap[imageKey] = true;
if (imageString != null) {
_images[imageKey] = imageString;
_imageMap[imageKey] = true;
}
}
Future<void> saveImageToPrefs(String key, String value) async {
@ -93,14 +95,14 @@ class ImageCache with Logging {
return image;
}
Future<String?> getImageAs64BaseString(int id, String name) async {
Future<String?>? getImageAs64BaseString(int id, String name) async {
final String imageKey = generateMd5(name + "_" + id.toString());
String? imageString;
if (await storage.containsKey(key: imageKey)) {
//log(" .. get from storage");
imageString = await storage.read(key: imageKey);
} else {
imageString = (await downloadAndSaveImage(id, name))!;
imageString = await downloadAndSaveImage(id, name);
//log(" .. downloaded");
}
return imageString;

View File

@ -118,7 +118,7 @@ class Cache with Logging {
static String baseUrlLive = 'https://api.workouttest.org/api/';
static String baseUrlTest = 'https://apitest.workouttest.org/api/';
late String baseUrl;
static final String mediaUrl = 'https://admin.aitrainer.app/media/';
static final String mediaUrl = 'https://admin.workouttest.org/media/';
static final String username = 'bosi';
static final String password = 'andio2009';

View File

@ -94,7 +94,7 @@ class CustomerTrainingPlanDetails {
this.exerciseType = Cache().getExerciseTypeById(exerciseTypeId!);
this.baseOneRepMax = json['baseOneRepMax'];
this.baseOneRepMax = json['baseOneRepMax'] == null ? 0 : json['baseOneRepMax'];
}
ExerciseType? getExerciseType() => exerciseType;

View File

@ -4,7 +4,7 @@ import 'package:aitrainer_app/model/mautic.dart';
import 'package:aitrainer_app/service/logging.dart';
class MauticApi with Logging {
final String mauticUrl = "https://mautic.aitrainer.app/form/submit?formId=";
final String mauticUrl = "https://mautic.workouttest.org/form/submit?formId=";
Future<void> sendMauticForm(Mautic model) async {
final String body = model.toForm();

View File

@ -568,6 +568,8 @@ class ExerciseTile extends StatelessWidget with Trans {
final bool hasRightAlternative =
detail.alternatives.length > 0 && index + 1 < bloc.alternatives[detail.customerTrainingPlanDetailsId].length;
print("getTile Detail: $detail");
return Container(
child: Stack(alignment: Alignment.centerRight, children: [
Stack(alignment: Alignment.centerLeft, children: [

View File

@ -229,19 +229,22 @@ class _ExerciseSaveState extends State<ExerciseSave> with Trans {
: widget.repeats!.toStringAsFixed(0);
changable = (_controller2.text != "TEST" && _controller1.text != "TEST");
if (widget.unitQuantityUnit != null && widget.tip != null && Cache().isActivityDone(widget.tip!) == false) {
Timer(
/*Timer(
Duration(milliseconds: 2000),
() => {
TutorialWidget().explanation(
context,
ExplanationWidget(
unitQuantityUnit: widget.unitQuantityUnit,
unit: widget.unit,
tip: widget.tip,
weight: widget.weight,
repeats: widget.repeats,
)),
});
if (context != null)
{
TutorialWidget().explanation(
context,
ExplanationWidget(
unitQuantityUnit: widget.unitQuantityUnit,
unit: widget.unit,
tip: widget.tip,
weight: widget.weight,
repeats: widget.repeats,
)),
}
});*/
}
});
}
@ -387,7 +390,7 @@ class _ExerciseSaveState extends State<ExerciseSave> with Trans {
leading: IconButton(
iconSize: 30,
onPressed: () => {
if (widget.unitQuantityUnit != null)
if (widget.unitQuantityUnit != null && context != null)
{
TutorialWidget().explanation(
context,

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.27+116
version: 1.1.28+117
environment:
sdk: ">=2.18.4 <3.0.0"