diff --git a/.gitignore b/.gitignore index bd90417..5148824 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ local.properties .vscode/launch.json .vscode/settings.json android/key.properties +bundletool.jar diff --git a/lib/main.dart b/lib/main.dart index a999888..dcb545c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -125,13 +125,15 @@ Future main() async { // - https://api.dartlang.org/stable/1.24.2/dart-async/Zone-class.html // - https://www.dartlang.org/articles/libraries/zones runZonedGuarded>(() async { - await SentryFlutter.init( - (options) { - options.dsn = dsn; - options.release = Cache().packageInfo != null ? Cache().packageInfo!.version + "+" + Cache().packageInfo!.buildNumber : ""; - options.enableAutoSessionTracking = true; - }, - ); + if (!isInDebugMode) { + await SentryFlutter.init( + (options) { + options.dsn = dsn; + options.release = Cache().packageInfo != null ? Cache().packageInfo!.version + "+" + Cache().packageInfo!.buildNumber : ""; + options.enableAutoSessionTracking = true; + }, + ); + } final WorkoutTreeRepository menuTreeRepository = WorkoutTreeRepository(); WidgetsFlutterBinding.ensureInitialized(); @@ -179,11 +181,11 @@ Future main() async { }); } -Future initFlurry() async { +Future initThirdParty() async { if (!isInDebugMode) { await Flurry.initialize(androidKey: "JNYCTCWBT34FM3J8TV36", iosKey: "3QBG7BSMGPDH24S8TRQP", enableLog: true); - /* SetupOptions options = (new SetupOptionsBuilder('682883e5cd71a46160c4f6ed070530ee593f49c6') +/* SetupOptions options = (new SetupOptionsBuilder('682883e5cd71a46160c4f6ed070530ee593f49c6') ..Fps = 2 ..StartNewSession = true) .build(); @@ -192,9 +194,11 @@ Future initFlurry() async { Smartlook.enableCrashlytics(true); Smartlook.setEventTrackingMode(EventTrackingMode.FULL_TRACKING); */ + PushNotificationsManager().init(); + + FlutterUxcam.startWithKey("wvdstyoml4tiwfd"); + FlutterUxcam.optIntoSchematicRecordings(); } - FlutterUxcam.startWithKey("wvdstyoml4tiwfd"); - FlutterUxcam.optIntoSchematicRecordings(); } class WorkoutTestApp extends StatelessWidget { @@ -205,8 +209,7 @@ class WorkoutTestApp extends StatelessWidget { final FirebaseAnalytics analytics = FirebaseAnalytics(); //facebookAppEvents.setAdvertiserTracking(enabled: true); - initFlurry(); - PushNotificationsManager().init(); + initThirdParty(); return MaterialApp( localizationsDelegates: [ // ... app-specific localization delegate[s] here diff --git a/lib/view/exercise_new_page.dart b/lib/view/exercise_new_page.dart index f1350ff..1e1feef 100644 --- a/lib/view/exercise_new_page.dart +++ b/lib/view/exercise_new_page.dart @@ -19,6 +19,7 @@ import 'package:aitrainer_app/widgets/bottom_bar_multiple_exercises.dart'; import 'package:aitrainer_app/widgets/dialog_common.dart'; import 'package:aitrainer_app/widgets/exercise_save.dart'; import 'package:aitrainer_app/widgets/size_widget.dart'; +import 'package:aitrainer_app/widgets/tutorial_widget.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -179,7 +180,11 @@ class _ExerciseNewPageState extends State with Trans, Logging { saveAll(bloc); return; } else { + if (tutorialBloc.isActive) { + TutorialWidget().close(); + } Navigator.of(context).pushNamed("registration"); + return; } } diff --git a/lib/view/mydevelopment_page.dart b/lib/view/mydevelopment_page.dart index 13cb84b..e69e9b1 100644 --- a/lib/view/mydevelopment_page.dart +++ b/lib/view/mydevelopment_page.dart @@ -154,18 +154,21 @@ class _MyDevelopmentPage extends State with Trans { backgroundColor: Colors.black54.withOpacity(0.4))), image: "asset/image/predictions.jpg", onTap: () => { - Track().track(TrackingEvent.prediction), - showDialog( - context: context, - builder: (BuildContext context) { - return DialogPremium( - unlocked: Cache().hasPurchased, - unlockRound: 3, - function: "Predictions", - unlockedText: null, - onTap: () => {Navigator.of(context).pop()}, - ); - }) + if (Cache().userLoggedIn != null) + { + Track().track(TrackingEvent.prediction), + showDialog( + context: context, + builder: (BuildContext context) { + return DialogPremium( + unlocked: Cache().hasPurchased, + unlockRound: 3, + function: "Predictions", + unlockedText: null, + onTap: () => {Navigator.of(context).pop()}, + ); + }) + } }, isLocked: true, ), diff --git a/lib/widgets/tutorial_widget.dart b/lib/widgets/tutorial_widget.dart index d04f31f..04e71fd 100644 --- a/lib/widgets/tutorial_widget.dart +++ b/lib/widgets/tutorial_widget.dart @@ -23,6 +23,10 @@ class TutorialWidget with Trans, Logging { } void tip(BuildContext context) { + final TutorialBloc bloc = BlocProvider.of(context); + if (bloc.action == null) { + return; + } setContext(context); if (tooltip != null && tooltip!.isOpen) { tooltip!.rebuild(); @@ -32,18 +36,15 @@ class TutorialWidget with Trans, Logging { var targetGlobalCenter = renderBox.localToGlobal(renderBox.size.center(Offset.zero), ancestor: overlay); - final TutorialBloc bloc = BlocProvider.of(context); final double mediaSize = MediaQuery.of(context).size.width; final double mediaHeight = MediaQuery.of(context).size.height; - Rect? area; - if (bloc.action != null) { - area = bloc.action!.showBubble == true - ? Rect.fromLTWH(mediaSize / 2 - 220, targetGlobalCenter.dy - bloc.action!.bubbleY, bloc.action!.bubbleWidth.toDouble(), - bloc.action!.bubbleHeight.toDouble()) - //? Rect.fromLTWH(targetGlobalCenter.dx - 60, targetGlobalCenter.dy + 120, 420, 320) - : null; - } + final Rect? area = bloc.action!.showBubble == true + ? Rect.fromLTWH(mediaSize / 2 - 220, targetGlobalCenter.dy - bloc.action!.bubbleY, bloc.action!.bubbleWidth.toDouble(), + bloc.action!.bubbleHeight.toDouble()) + //? Rect.fromLTWH(targetGlobalCenter.dx - 60, targetGlobalCenter.dy + 120, 420, 320) + //: Rect.fromLTWH(0, 0, 100, 100); + : null; final double distortion = mediaHeight / bloc.mediaHeightBase; @@ -59,7 +60,7 @@ class TutorialWidget with Trans, Logging { calculatedTop = 10; } print("Height: $mediaHeight, width: $mediaSize distortion: $distortion top: ${bloc.top!} calculated $calculatedTop"); - print("targetCenter X ${targetGlobalCenter.dx}"); + print("targetCenter X ${targetGlobalCenter.dx} - Y: ${targetGlobalCenter.dy}"); tooltip = SuperTooltip( top: calculatedTop, diff --git a/pubspec.yaml b/pubspec.yaml index c385f10..d7624b1 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.14+71 +version: 1.1.14+72 environment: sdk: ">=2.12.0 <3.0.0"