WT 1.1.14 uxcam fix, nullsafe changes

This commit is contained in:
bossanyit 2021-05-07 19:02:33 +02:00
parent cd0687a529
commit f4344bcf11
6 changed files with 49 additions and 36 deletions

1
.gitignore vendored
View File

@ -47,3 +47,4 @@ local.properties
.vscode/launch.json .vscode/launch.json
.vscode/settings.json .vscode/settings.json
android/key.properties android/key.properties
bundletool.jar

View File

@ -125,6 +125,7 @@ Future<Null> main() async {
// - https://api.dartlang.org/stable/1.24.2/dart-async/Zone-class.html // - https://api.dartlang.org/stable/1.24.2/dart-async/Zone-class.html
// - https://www.dartlang.org/articles/libraries/zones // - https://www.dartlang.org/articles/libraries/zones
runZonedGuarded<Future<Null>>(() async { runZonedGuarded<Future<Null>>(() async {
if (!isInDebugMode) {
await SentryFlutter.init( await SentryFlutter.init(
(options) { (options) {
options.dsn = dsn; options.dsn = dsn;
@ -132,6 +133,7 @@ Future<Null> main() async {
options.enableAutoSessionTracking = true; options.enableAutoSessionTracking = true;
}, },
); );
}
final WorkoutTreeRepository menuTreeRepository = WorkoutTreeRepository(); final WorkoutTreeRepository menuTreeRepository = WorkoutTreeRepository();
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
@ -179,7 +181,7 @@ Future<Null> main() async {
}); });
} }
Future<void> initFlurry() async { Future<void> initThirdParty() async {
if (!isInDebugMode) { if (!isInDebugMode) {
await Flurry.initialize(androidKey: "JNYCTCWBT34FM3J8TV36", iosKey: "3QBG7BSMGPDH24S8TRQP", enableLog: true); await Flurry.initialize(androidKey: "JNYCTCWBT34FM3J8TV36", iosKey: "3QBG7BSMGPDH24S8TRQP", enableLog: true);
@ -192,10 +194,12 @@ Future<void> initFlurry() async {
Smartlook.enableCrashlytics(true); Smartlook.enableCrashlytics(true);
Smartlook.setEventTrackingMode(EventTrackingMode.FULL_TRACKING); */ Smartlook.setEventTrackingMode(EventTrackingMode.FULL_TRACKING); */
} PushNotificationsManager().init();
FlutterUxcam.startWithKey("wvdstyoml4tiwfd"); FlutterUxcam.startWithKey("wvdstyoml4tiwfd");
FlutterUxcam.optIntoSchematicRecordings(); FlutterUxcam.optIntoSchematicRecordings();
} }
}
class WorkoutTestApp extends StatelessWidget { class WorkoutTestApp extends StatelessWidget {
static final facebookAppEvents = FacebookAppEvents(); static final facebookAppEvents = FacebookAppEvents();
@ -205,8 +209,7 @@ class WorkoutTestApp extends StatelessWidget {
final FirebaseAnalytics analytics = FirebaseAnalytics(); final FirebaseAnalytics analytics = FirebaseAnalytics();
//facebookAppEvents.setAdvertiserTracking(enabled: true); //facebookAppEvents.setAdvertiserTracking(enabled: true);
initFlurry(); initThirdParty();
PushNotificationsManager().init();
return MaterialApp( return MaterialApp(
localizationsDelegates: [ localizationsDelegates: [
// ... app-specific localization delegate[s] here // ... app-specific localization delegate[s] here

View File

@ -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/dialog_common.dart';
import 'package:aitrainer_app/widgets/exercise_save.dart'; import 'package:aitrainer_app/widgets/exercise_save.dart';
import 'package:aitrainer_app/widgets/size_widget.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_bloc/flutter_bloc.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -179,7 +180,11 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
saveAll(bloc); saveAll(bloc);
return; return;
} else { } else {
if (tutorialBloc.isActive) {
TutorialWidget().close();
}
Navigator.of(context).pushNamed("registration"); Navigator.of(context).pushNamed("registration");
return;
} }
} }

View File

@ -154,6 +154,8 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
backgroundColor: Colors.black54.withOpacity(0.4))), backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/predictions.jpg", image: "asset/image/predictions.jpg",
onTap: () => { onTap: () => {
if (Cache().userLoggedIn != null)
{
Track().track(TrackingEvent.prediction), Track().track(TrackingEvent.prediction),
showDialog( showDialog(
context: context, context: context,
@ -166,6 +168,7 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
onTap: () => {Navigator.of(context).pop()}, onTap: () => {Navigator.of(context).pop()},
); );
}) })
}
}, },
isLocked: true, isLocked: true,
), ),

View File

@ -23,6 +23,10 @@ class TutorialWidget with Trans, Logging {
} }
void tip(BuildContext context) { void tip(BuildContext context) {
final TutorialBloc bloc = BlocProvider.of<TutorialBloc>(context);
if (bloc.action == null) {
return;
}
setContext(context); setContext(context);
if (tooltip != null && tooltip!.isOpen) { if (tooltip != null && tooltip!.isOpen) {
tooltip!.rebuild(); tooltip!.rebuild();
@ -32,18 +36,15 @@ class TutorialWidget with Trans, Logging {
var targetGlobalCenter = renderBox.localToGlobal(renderBox.size.center(Offset.zero), ancestor: overlay); var targetGlobalCenter = renderBox.localToGlobal(renderBox.size.center(Offset.zero), ancestor: overlay);
final TutorialBloc bloc = BlocProvider.of<TutorialBloc>(context);
final double mediaSize = MediaQuery.of(context).size.width; final double mediaSize = MediaQuery.of(context).size.width;
final double mediaHeight = MediaQuery.of(context).size.height; final double mediaHeight = MediaQuery.of(context).size.height;
Rect? area; final Rect? area = bloc.action!.showBubble == true
if (bloc.action != null) {
area = bloc.action!.showBubble == true
? Rect.fromLTWH(mediaSize / 2 - 220, targetGlobalCenter.dy - bloc.action!.bubbleY, bloc.action!.bubbleWidth.toDouble(), ? Rect.fromLTWH(mediaSize / 2 - 220, targetGlobalCenter.dy - bloc.action!.bubbleY, bloc.action!.bubbleWidth.toDouble(),
bloc.action!.bubbleHeight.toDouble()) bloc.action!.bubbleHeight.toDouble())
//? Rect.fromLTWH(targetGlobalCenter.dx - 60, targetGlobalCenter.dy + 120, 420, 320) //? Rect.fromLTWH(targetGlobalCenter.dx - 60, targetGlobalCenter.dy + 120, 420, 320)
//: Rect.fromLTWH(0, 0, 100, 100);
: null; : null;
}
final double distortion = mediaHeight / bloc.mediaHeightBase; final double distortion = mediaHeight / bloc.mediaHeightBase;
@ -59,7 +60,7 @@ class TutorialWidget with Trans, Logging {
calculatedTop = 10; calculatedTop = 10;
} }
print("Height: $mediaHeight, width: $mediaSize distortion: $distortion top: ${bloc.top!} calculated $calculatedTop"); 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( tooltip = SuperTooltip(
top: calculatedTop, top: calculatedTop,

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. # 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.14+71 version: 1.1.14+72
environment: environment:
sdk: ">=2.12.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"