diff --git a/android/app/build.gradle b/android/app/build.gradle
index dd0d120..c148cca 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -50,6 +50,7 @@ android {
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
+ ndk.abiFilters 'armeabi-v7a', 'arm64-v8a','x86_64'
}
android {
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..90f9580
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index e008bbb..d3a6e62 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png
new file mode 100644
index 0000000..19442fb
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png
new file mode 100644
index 0000000..5e41494
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png
index 96542d7..d3a6e62 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index e2fc904..337dbd2 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png
new file mode 100644
index 0000000..554cbdf
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png
new file mode 100644
index 0000000..ae44570
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png
index 599b77d..337dbd2 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 723aea0..e852a1b 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png
new file mode 100644
index 0000000..860778e
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png
new file mode 100644
index 0000000..cc084da
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
index c0b36cb..e852a1b 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index 74b9c8d..20365b3 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png
new file mode 100644
index 0000000..4d96fbe
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png
new file mode 100644
index 0000000..a4699ee
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
index 355ce67..20365b3 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 2ed2b14..7cbca66 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png
new file mode 100644
index 0000000..9fc7a10
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png
new file mode 100644
index 0000000..d2f85b9
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png
index 98a3a0c..7cbca66 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ
diff --git a/asset/icon/icon.png b/asset/icon/icon.png
index 6ba6e3a..b0e5a3f 100644
Binary files a/asset/icon/icon.png and b/asset/icon/icon.png differ
diff --git a/asset/icon/icon0.png b/asset/icon/icon0.png
deleted file mode 100644
index 08b76b4..0000000
Binary files a/asset/icon/icon0.png and /dev/null differ
diff --git a/asset/icon/icon1.png b/asset/icon/icon1.png
deleted file mode 100644
index 3e6e540..0000000
Binary files a/asset/icon/icon1.png and /dev/null differ
diff --git a/lib/bloc/exercise_new/exercise_new_bloc.dart b/lib/bloc/exercise_new/exercise_new_bloc.dart
index 53e4e6e..e63e7aa 100644
--- a/lib/bloc/exercise_new/exercise_new_bloc.dart
+++ b/lib/bloc/exercise_new/exercise_new_bloc.dart
@@ -1,6 +1,6 @@
import 'package:aitrainer_app/repository/mautic_repository.dart';
import 'package:intl/intl.dart';
-import 'package:aitrainer_app/main.dart';
+import 'package:flutter/foundation.dart';
import 'package:aitrainer_app/bloc/menu/menu_bloc.dart';
import 'package:aitrainer_app/model/cache.dart';
@@ -175,7 +175,7 @@ class ExerciseNewBloc extends Bloc with Logg
exerciseRepository.end = DateTime.now();
await exerciseRepository.addExercise();
- if (!isInDebugMode) {
+ if (kReleaseMode) {
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
await mauticRepository.sendMauticExercise();
}
diff --git a/lib/bloc/test_set_new/test_set_new_bloc.dart b/lib/bloc/test_set_new/test_set_new_bloc.dart
index 2821c87..2f0807f 100644
--- a/lib/bloc/test_set_new/test_set_new_bloc.dart
+++ b/lib/bloc/test_set_new/test_set_new_bloc.dart
@@ -1,4 +1,4 @@
-import 'package:aitrainer_app/main.dart';
+import 'package:flutter/foundation.dart';
import 'package:aitrainer_app/bloc/test_set_execute/test_set_execute_bloc.dart';
import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/model/exercise_type.dart';
@@ -61,7 +61,7 @@ class TestSetNewBloc extends Bloc {
exerciseRepository.end = DateTime.now();
await exerciseRepository.addExercise();
executeBloc.add(TestSetExecuteExerciseFinished(exerciseTypeId: exerciseType.exerciseTypeId, quantity: quantity, unitQuantity: unitQuantity));
- if (!isInDebugMode) {
+ if (kReleaseMode) {
CustomerRepository customerRepository = CustomerRepository();
customerRepository.customer = Cache().userLoggedIn;
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
diff --git a/lib/bloc/training_plan/training_plan_bloc.dart b/lib/bloc/training_plan/training_plan_bloc.dart
index 8b92bb0..89ef927 100644
--- a/lib/bloc/training_plan/training_plan_bloc.dart
+++ b/lib/bloc/training_plan/training_plan_bloc.dart
@@ -23,6 +23,7 @@ import 'package:aitrainer_app/widgets/exercise_save.dart';
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
+import 'package:flutter/foundation.dart';
part 'training_plan_event.dart';
part 'training_plan_state.dart';
@@ -174,7 +175,7 @@ class TrainingPlanBloc extends Bloc with C
await Cache().saveMyTrainingPlan();
}
- if (!isInDebugMode) {
+ if (kReleaseMode) {
CustomerRepository customerRepository = CustomerRepository();
customerRepository.customer = Cache().userLoggedIn;
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
diff --git a/lib/main.dart b/lib/main.dart
index 2f071ae..a24cf78 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -54,6 +54,7 @@ import 'package:aitrainer_app/util/app_localization.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:matomo_tracker/matomo_tracker.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
+import 'package:flutter/foundation.dart';
import 'package:posthog_flutter/posthog_flutter.dart';
import 'package:upgrader/upgrader.dart';
@@ -71,17 +72,6 @@ import 'package:syncfusion_localizations/syncfusion_localizations.dart';
const dsn = 'https://2309523cf2374c089fa1143d19209bc1@glitch.workouttest.org/2';
-/// Whether the VM is running in debug mode.
-///
-/// This is useful to decide whether a report should be sent to sentry. Usually
-/// reports from dev mode are not very useful, as these happen on developers'
-/// workspaces rather than on users' devices in production.
-bool get isInDebugMode {
- bool inDebugMode = false;
- assert(inDebugMode = true);
- return inDebugMode;
-}
-
/// Reports [error] along with its [stackTrace] to Sentry.io.
Future _reportError(dynamic error, dynamic stackTrace) async {
print('Caught error: $error');
@@ -89,7 +79,7 @@ Future _reportError(dynamic error, dynamic stackTrace) async {
// Errors thrown in development mode are unlikely to be interesting. You can
// check if you are running in dev mode using an assertion and omit sending
// the report.
- if (isInDebugMode) {
+ if (!kReleaseMode) {
print(stackTrace);
print('In dev mode. Not sending report to Sentry.io.');
return;
@@ -103,9 +93,10 @@ Future _reportError(dynamic error, dynamic stackTrace) async {
}
Future main() async {
+
// This captures errors reported by the Flutter framework.
FlutterError.onError = (FlutterErrorDetails details) async {
- if (isInDebugMode) {
+ if (!kReleaseMode) {
// In development mode simply print to console.
FlutterError.dumpErrorToConsole(details);
//} else {
@@ -116,7 +107,7 @@ Future main() async {
};
Future initThirdParty() async {
- if (!isInDebugMode) {
+ if (kReleaseMode) {
await MatomoTracker.instance.initialize(
siteId: 3,
url: 'https://matomo.workouttest.org/matomo.php',
@@ -285,8 +276,6 @@ class WorkoutTestApp extends StatelessWidget {
title: 'WorkoutTest',
theme: ThemeData(
brightness: Brightness.light,
- //primarySwatch: Colors.transparent,
- //fontFamily: 'Arial',
textTheme: TextTheme(
bodyText1: GoogleFonts.inter(textStyle: TextStyle(fontSize: 14.0)),
)),
diff --git a/lib/model/cache.dart b/lib/model/cache.dart
index 123b34e..0527bf6 100644
--- a/lib/model/cache.dart
+++ b/lib/model/cache.dart
@@ -1,5 +1,6 @@
import 'dart:collection';
import 'dart:convert';
+import 'package:flutter/foundation.dart';
import 'package:aitrainer_app/model/customer.dart';
import 'package:aitrainer_app/model/customer_activity.dart';
import 'package:aitrainer_app/model/customer_property.dart';
@@ -27,20 +28,16 @@ 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';
import 'package:firebase_remote_config/firebase_remote_config.dart';
-//import 'package:flurry_data/flurry_data.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
-//import 'package:flutter_uxcam/flutter_uxcam.dart';
import 'package:matomo_tracker/matomo_tracker.dart';
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:flutter_smartlook/flutter_smartlook.dart';
import 'customer_exercise_device.dart';
import 'exercise_device.dart';
@@ -695,7 +692,7 @@ class Cache with Logging {
return;
}
- if (!isInDebugMode) {
+ if (kReleaseMode) {
//FlurryData.setUserId(customerId.toString());
//FlutterUxcam.setUserProperty("username", customerId.toString());
//FlutterUxcam.setUserIdentity(customerId.toString());
diff --git a/lib/util/track.dart b/lib/util/track.dart
index fa6c551..996ccad 100644
--- a/lib/util/track.dart
+++ b/lib/util/track.dart
@@ -1,4 +1,3 @@
-import 'package:aitrainer_app/main.dart';
import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/service/logging.dart';
import 'package:aitrainer_app/service/tracking_service.dart';
@@ -8,6 +7,7 @@ import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:posthog_flutter/posthog_flutter.dart';
import 'package:matomo_tracker/matomo_tracker.dart';
+import 'package:flutter/foundation.dart';
class Track with Logging {
static final Track _singleton = Track._internal();
@@ -22,7 +22,7 @@ class Track with Logging {
void track(TrackingEvent event, {String eventValue = ""}) {
model.Tracking tracking = model.Tracking();
tracking.customerId = Cache().userLoggedIn == null ? 0 : Cache().userLoggedIn!.customerId!;
- if (!isInDebugMode) {
+ if (kReleaseMode) {
tracking.event = event.enumToString();
if (eventValue.isNotEmpty) {
tracking.eventValue = eventValue;
diff --git a/pubspec.lock b/pubspec.lock
index 3e76743..8176e11 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -1516,7 +1516,7 @@ packages:
name: upgrader
url: "https://pub.dartlang.org"
source: hosted
- version: "4.10.0"
+ version: "4.11.1"
url_launcher:
dependency: "direct main"
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index 7337e2a..13eb0e8 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -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.26+110
+version: 1.1.26+112
environment:
sdk: ">=2.12.0 <3.9.0"
@@ -93,7 +93,7 @@ dependencies:
timeline_tile: ^2.0.0
toggle_switch: ^2.0.1
- upgrader: ^4.10.0
+ upgrader: ^4.11.1
url_launcher: ^6.0.9
wakelock: ^0.6.2