v1.1.26 release, mode
@ -50,6 +50,7 @@ android {
|
|||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
ndk.abiFilters 'armeabi-v7a', 'arm64-v8a','x86_64'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@mipmap/ic_launcher_adaptive_back"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_adaptive_fore"/>
|
||||||
|
</adaptive-icon>
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 5.9 MiB |
Before Width: | Height: | Size: 307 KiB |
Before Width: | Height: | Size: 228 KiB |
@ -1,6 +1,6 @@
|
|||||||
import 'package:aitrainer_app/repository/mautic_repository.dart';
|
import 'package:aitrainer_app/repository/mautic_repository.dart';
|
||||||
import 'package:intl/intl.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/bloc/menu/menu_bloc.dart';
|
||||||
import 'package:aitrainer_app/model/cache.dart';
|
import 'package:aitrainer_app/model/cache.dart';
|
||||||
@ -175,7 +175,7 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
|
|||||||
|
|
||||||
exerciseRepository.end = DateTime.now();
|
exerciseRepository.end = DateTime.now();
|
||||||
await exerciseRepository.addExercise();
|
await exerciseRepository.addExercise();
|
||||||
if (!isInDebugMode) {
|
if (kReleaseMode) {
|
||||||
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
|
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
|
||||||
await mauticRepository.sendMauticExercise();
|
await mauticRepository.sendMauticExercise();
|
||||||
}
|
}
|
||||||
|
@ -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/bloc/test_set_execute/test_set_execute_bloc.dart';
|
||||||
import 'package:aitrainer_app/model/cache.dart';
|
import 'package:aitrainer_app/model/cache.dart';
|
||||||
import 'package:aitrainer_app/model/exercise_type.dart';
|
import 'package:aitrainer_app/model/exercise_type.dart';
|
||||||
@ -61,7 +61,7 @@ class TestSetNewBloc extends Bloc<TestSetNewEvent, TestSetNewState> {
|
|||||||
exerciseRepository.end = DateTime.now();
|
exerciseRepository.end = DateTime.now();
|
||||||
await exerciseRepository.addExercise();
|
await exerciseRepository.addExercise();
|
||||||
executeBloc.add(TestSetExecuteExerciseFinished(exerciseTypeId: exerciseType.exerciseTypeId, quantity: quantity, unitQuantity: unitQuantity));
|
executeBloc.add(TestSetExecuteExerciseFinished(exerciseTypeId: exerciseType.exerciseTypeId, quantity: quantity, unitQuantity: unitQuantity));
|
||||||
if (!isInDebugMode) {
|
if (kReleaseMode) {
|
||||||
CustomerRepository customerRepository = CustomerRepository();
|
CustomerRepository customerRepository = CustomerRepository();
|
||||||
customerRepository.customer = Cache().userLoggedIn;
|
customerRepository.customer = Cache().userLoggedIn;
|
||||||
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
|
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
|
||||||
|
@ -23,6 +23,7 @@ import 'package:aitrainer_app/widgets/exercise_save.dart';
|
|||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
part 'training_plan_event.dart';
|
part 'training_plan_event.dart';
|
||||||
part 'training_plan_state.dart';
|
part 'training_plan_state.dart';
|
||||||
@ -174,7 +175,7 @@ class TrainingPlanBloc extends Bloc<TrainingPlanEvent, TrainingPlanState> with C
|
|||||||
await Cache().saveMyTrainingPlan();
|
await Cache().saveMyTrainingPlan();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isInDebugMode) {
|
if (kReleaseMode) {
|
||||||
CustomerRepository customerRepository = CustomerRepository();
|
CustomerRepository customerRepository = CustomerRepository();
|
||||||
customerRepository.customer = Cache().userLoggedIn;
|
customerRepository.customer = Cache().userLoggedIn;
|
||||||
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
|
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
|
||||||
|
@ -54,6 +54,7 @@ import 'package:aitrainer_app/util/app_localization.dart';
|
|||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:matomo_tracker/matomo_tracker.dart';
|
import 'package:matomo_tracker/matomo_tracker.dart';
|
||||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
import 'package:posthog_flutter/posthog_flutter.dart';
|
import 'package:posthog_flutter/posthog_flutter.dart';
|
||||||
import 'package:upgrader/upgrader.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';
|
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.
|
/// Reports [error] along with its [stackTrace] to Sentry.io.
|
||||||
Future<Null> _reportError(dynamic error, dynamic stackTrace) async {
|
Future<Null> _reportError(dynamic error, dynamic stackTrace) async {
|
||||||
print('Caught error: $error');
|
print('Caught error: $error');
|
||||||
@ -89,7 +79,7 @@ Future<Null> _reportError(dynamic error, dynamic stackTrace) async {
|
|||||||
// Errors thrown in development mode are unlikely to be interesting. You can
|
// 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
|
// check if you are running in dev mode using an assertion and omit sending
|
||||||
// the report.
|
// the report.
|
||||||
if (isInDebugMode) {
|
if (!kReleaseMode) {
|
||||||
print(stackTrace);
|
print(stackTrace);
|
||||||
print('In dev mode. Not sending report to Sentry.io.');
|
print('In dev mode. Not sending report to Sentry.io.');
|
||||||
return;
|
return;
|
||||||
@ -103,9 +93,10 @@ Future<Null> _reportError(dynamic error, dynamic stackTrace) async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<Null> main() async {
|
Future<Null> main() async {
|
||||||
|
|
||||||
// This captures errors reported by the Flutter framework.
|
// This captures errors reported by the Flutter framework.
|
||||||
FlutterError.onError = (FlutterErrorDetails details) async {
|
FlutterError.onError = (FlutterErrorDetails details) async {
|
||||||
if (isInDebugMode) {
|
if (!kReleaseMode) {
|
||||||
// In development mode simply print to console.
|
// In development mode simply print to console.
|
||||||
FlutterError.dumpErrorToConsole(details);
|
FlutterError.dumpErrorToConsole(details);
|
||||||
//} else {
|
//} else {
|
||||||
@ -116,7 +107,7 @@ Future<Null> main() async {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Future<void> initThirdParty() async {
|
Future<void> initThirdParty() async {
|
||||||
if (!isInDebugMode) {
|
if (kReleaseMode) {
|
||||||
await MatomoTracker.instance.initialize(
|
await MatomoTracker.instance.initialize(
|
||||||
siteId: 3,
|
siteId: 3,
|
||||||
url: 'https://matomo.workouttest.org/matomo.php',
|
url: 'https://matomo.workouttest.org/matomo.php',
|
||||||
@ -285,8 +276,6 @@ class WorkoutTestApp extends StatelessWidget {
|
|||||||
title: 'WorkoutTest',
|
title: 'WorkoutTest',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
//primarySwatch: Colors.transparent,
|
|
||||||
//fontFamily: 'Arial',
|
|
||||||
textTheme: TextTheme(
|
textTheme: TextTheme(
|
||||||
bodyText1: GoogleFonts.inter(textStyle: TextStyle(fontSize: 14.0)),
|
bodyText1: GoogleFonts.inter(textStyle: TextStyle(fontSize: 14.0)),
|
||||||
)),
|
)),
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'dart:collection';
|
import 'dart:collection';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:aitrainer_app/model/customer.dart';
|
import 'package:aitrainer_app/model/customer.dart';
|
||||||
import 'package:aitrainer_app/model/customer_activity.dart';
|
import 'package:aitrainer_app/model/customer_activity.dart';
|
||||||
import 'package:aitrainer_app/model/customer_property.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/firebase_api.dart';
|
||||||
import 'package:aitrainer_app/service/logging.dart';
|
import 'package:aitrainer_app/service/logging.dart';
|
||||||
import 'package:aitrainer_app/service/package_service.dart';
|
import 'package:aitrainer_app/service/package_service.dart';
|
||||||
import 'package:aitrainer_app/main.dart';
|
|
||||||
import 'package:aitrainer_app/util/enums.dart';
|
import 'package:aitrainer_app/util/enums.dart';
|
||||||
import 'package:aitrainer_app/util/env.dart';
|
import 'package:aitrainer_app/util/env.dart';
|
||||||
import 'package:aitrainer_app/util/track.dart';
|
import 'package:aitrainer_app/util/track.dart';
|
||||||
import 'package:firebase_remote_config/firebase_remote_config.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_facebook_auth/flutter_facebook_auth.dart';
|
||||||
//import 'package:flutter_uxcam/flutter_uxcam.dart';
|
|
||||||
import 'package:matomo_tracker/matomo_tracker.dart';
|
import 'package:matomo_tracker/matomo_tracker.dart';
|
||||||
import 'package:package_info/package_info.dart';
|
import 'package:package_info/package_info.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:aitrainer_app/model/exercise_type.dart';
|
import 'package:aitrainer_app/model/exercise_type.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
//import 'package:flutter_smartlook/flutter_smartlook.dart';
|
|
||||||
|
|
||||||
import 'customer_exercise_device.dart';
|
import 'customer_exercise_device.dart';
|
||||||
import 'exercise_device.dart';
|
import 'exercise_device.dart';
|
||||||
@ -695,7 +692,7 @@ class Cache with Logging {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isInDebugMode) {
|
if (kReleaseMode) {
|
||||||
//FlurryData.setUserId(customerId.toString());
|
//FlurryData.setUserId(customerId.toString());
|
||||||
//FlutterUxcam.setUserProperty("username", customerId.toString());
|
//FlutterUxcam.setUserProperty("username", customerId.toString());
|
||||||
//FlutterUxcam.setUserIdentity(customerId.toString());
|
//FlutterUxcam.setUserIdentity(customerId.toString());
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import 'package:aitrainer_app/main.dart';
|
|
||||||
import 'package:aitrainer_app/model/cache.dart';
|
import 'package:aitrainer_app/model/cache.dart';
|
||||||
import 'package:aitrainer_app/service/logging.dart';
|
import 'package:aitrainer_app/service/logging.dart';
|
||||||
import 'package:aitrainer_app/service/tracking_service.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:firebase_messaging/firebase_messaging.dart';
|
||||||
import 'package:posthog_flutter/posthog_flutter.dart';
|
import 'package:posthog_flutter/posthog_flutter.dart';
|
||||||
import 'package:matomo_tracker/matomo_tracker.dart';
|
import 'package:matomo_tracker/matomo_tracker.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
class Track with Logging {
|
class Track with Logging {
|
||||||
static final Track _singleton = Track._internal();
|
static final Track _singleton = Track._internal();
|
||||||
@ -22,7 +22,7 @@ class Track with Logging {
|
|||||||
void track(TrackingEvent event, {String eventValue = ""}) {
|
void track(TrackingEvent event, {String eventValue = ""}) {
|
||||||
model.Tracking tracking = model.Tracking();
|
model.Tracking tracking = model.Tracking();
|
||||||
tracking.customerId = Cache().userLoggedIn == null ? 0 : Cache().userLoggedIn!.customerId!;
|
tracking.customerId = Cache().userLoggedIn == null ? 0 : Cache().userLoggedIn!.customerId!;
|
||||||
if (!isInDebugMode) {
|
if (kReleaseMode) {
|
||||||
tracking.event = event.enumToString();
|
tracking.event = event.enumToString();
|
||||||
if (eventValue.isNotEmpty) {
|
if (eventValue.isNotEmpty) {
|
||||||
tracking.eventValue = eventValue;
|
tracking.eventValue = eventValue;
|
||||||
|
@ -1516,7 +1516,7 @@ packages:
|
|||||||
name: upgrader
|
name: upgrader
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.10.0"
|
version: "4.11.1"
|
||||||
url_launcher:
|
url_launcher:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.1.26+110
|
version: 1.1.26+112
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0 <3.9.0"
|
sdk: ">=2.12.0 <3.9.0"
|
||||||
@ -93,7 +93,7 @@ dependencies:
|
|||||||
timeline_tile: ^2.0.0
|
timeline_tile: ^2.0.0
|
||||||
toggle_switch: ^2.0.1
|
toggle_switch: ^2.0.1
|
||||||
|
|
||||||
upgrader: ^4.10.0
|
upgrader: ^4.11.1
|
||||||
url_launcher: ^6.0.9
|
url_launcher: ^6.0.9
|
||||||
|
|
||||||
wakelock: ^0.6.2
|
wakelock: ^0.6.2
|
||||||
|