v1.1.26 release, mode

This commit is contained in:
Tibor Bossanyi (Freelancer) 2022-11-15 07:41:04 +01:00
parent cbaa1a5b81
commit ba36a10790
33 changed files with 24 additions and 31 deletions

View File

@ -50,6 +50,7 @@ android {
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
ndk.abiFilters 'armeabi-v7a', 'arm64-v8a','x86_64'
}
android {

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 5.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

View File

@ -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<ExerciseNewEvent, ExerciseNewState> with Logg
exerciseRepository.end = DateTime.now();
await exerciseRepository.addExercise();
if (!isInDebugMode) {
if (kReleaseMode) {
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);
await mauticRepository.sendMauticExercise();
}

View File

@ -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<TestSetNewEvent, TestSetNewState> {
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);

View File

@ -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<TrainingPlanEvent, TrainingPlanState> with C
await Cache().saveMyTrainingPlan();
}
if (!isInDebugMode) {
if (kReleaseMode) {
CustomerRepository customerRepository = CustomerRepository();
customerRepository.customer = Cache().userLoggedIn;
MauticRepository mauticRepository = MauticRepository(customerRepository: customerRepository);

View File

@ -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<Null> _reportError(dynamic error, dynamic stackTrace) async {
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
// 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<Null> _reportError(dynamic error, dynamic stackTrace) async {
}
Future<Null> 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<Null> main() async {
};
Future<void> 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)),
)),

View File

@ -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());

View File

@ -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;

View File

@ -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:

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.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