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/settings.json
android/key.properties
bundletool.jar

View File

@ -125,13 +125,15 @@ Future<Null> main() async {
// - https://api.dartlang.org/stable/1.24.2/dart-async/Zone-class.html
// - https://www.dartlang.org/articles/libraries/zones
runZonedGuarded<Future<Null>>(() 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<Null> main() async {
});
}
Future<void> initFlurry() async {
Future<void> 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<void> 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

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/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<ExerciseNewPage> with Trans, Logging {
saveAll(bloc);
return;
} else {
if (tutorialBloc.isActive) {
TutorialWidget().close();
}
Navigator.of(context).pushNamed("registration");
return;
}
}

View File

@ -154,18 +154,21 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> 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,
),

View File

@ -23,6 +23,10 @@ class TutorialWidget with Trans, Logging {
}
void tip(BuildContext context) {
final TutorialBloc bloc = BlocProvider.of<TutorialBloc>(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<TutorialBloc>(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,

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