WT 1.1.14 tutorial positions fix, uxcam settings

This commit is contained in:
bossanyit 2021-05-06 22:44:55 +02:00
parent 3137bc2330
commit cd0687a529
10 changed files with 77 additions and 115 deletions

View File

@ -474,7 +474,7 @@
"The app functionalitity will be restricted, but please take a tour!":"The app functionalitity will be restricted, but please take a tour!",
"Activating the basic tutorial":"Activating the basic tutorial",
"Basic Tutorial":"Basic Tutorial",
"Basic Tutorial":"Tutorial",
"Activate":"Activate",
"Try free for 3 days!":"Try it without risk for 3 days! In this period you can cancel any time without lasting your account.",

View File

@ -466,8 +466,8 @@
"The app functionalitity will be restricted, but please take a tour!":"Az applikációt korlátozottan tudod így használni, de tégy egy túrát!",
"Activating the basic tutorial":"Bemutató aktiválása",
"Basic Tutorial":"Alap bemutató",
"Activate":"Aktivál",
"Basic Tutorial":"Tutorial",
"Activate":"Aktiválás",
"Try free for 3 days!":"Próbáld ki kockázat nélkül 3 napig! Ebben az időszakban bármikor lemondhatod, anélkül, hogy megterhelnénk a számládat.",
"View other alternatives":"Megnézek egy másik lehetőséget"

View File

@ -388,7 +388,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -531,7 +531,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -566,7 +566,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (

View File

@ -12,7 +12,7 @@ part 'tutorial_state.dart';
class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
late String tutorialName;
final double mediaHeightBase = 390;
final double mediaHeightBase = 675;
bool isActive = false;
bool canActivate = false;
@ -78,8 +78,6 @@ class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
this.showCheckText = action!.showCheckText == true;
this.parent = action!.parent;
}
calculateHeight();
}
}
@ -110,17 +108,6 @@ class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
return true;
}
void calculateHeight() {
int count = getElementCount('<p>');
count += getElementCount('<br/>');
double lines = (actualText!.length / 32 + count);
if (lines < 5) {
lines = lines + 2;
}
calculatedHeight = lines * 15;
print("Calculated Height: $calculatedHeight length: ${actualText!.length} lines: $lines count: $count");
}
int getElementCount(String elem) {
int pos = 0;
int count = 0;
@ -180,7 +167,6 @@ class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
print("Step: $step");
setNextStepData(step);
print("Menu rebuild $menuBloc");
if (menuBloc != null) {
menuBloc!.add(MenuCreate());
}
@ -200,7 +186,6 @@ class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
isActive = false;
canActivate = false;
ActivityDone? activityDone = ActivityDone.tutorialBasic.searchByString(tutorialName);
print("activity Finished: $activityDone");
if (activityDone != null) {
await Cache().setActivityDonePrefs(activityDone);
}

View File

@ -192,10 +192,9 @@ Future<void> initFlurry() async {
Smartlook.enableCrashlytics(true);
Smartlook.setEventTrackingMode(EventTrackingMode.FULL_TRACKING); */
FlutterUxcam.optIntoSchematicRecordings();
// FlutterUxcam.optIntoVideoRecording();
FlutterUxcam.startWithKey("wvdstyoml4tiwfd");
}
FlutterUxcam.startWithKey("wvdstyoml4tiwfd");
FlutterUxcam.optIntoSchematicRecordings();
}
class WorkoutTestApp extends StatelessWidget {

View File

@ -216,25 +216,27 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
}
void evaluation(ExerciseRepository exerciseRepository, Exercise exercise) {
if (!Cache().hasPurchased) {
showDialog(
context: context,
builder: (BuildContext context) {
return DialogPremium(
unlocked: Cache().hasPurchased,
unlockRound: 1,
unlockedText: t("Enjoy also this premium fetaure to show all old evaluation data of your successful exercises."),
function: "My Exercise Logs",
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
);
});
} else {
LinkedHashMap args = LinkedHashMap();
args['exerciseRepository'] = exerciseRepository;
args['exercise'] = exercise;
args['past'] = true;
Navigator.of(context).pushNamed('evaluationPage', arguments: args);
if (Cache().userLoggedIn != null) {
if (!Cache().hasPurchased) {
showDialog(
context: context,
builder: (BuildContext context) {
return DialogPremium(
unlocked: Cache().hasPurchased,
unlockRound: 1,
unlockedText: t("Enjoy also this premium fetaure to show all old evaluation data of your successful exercises."),
function: "My Exercise Logs",
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
);
});
} else {
LinkedHashMap args = LinkedHashMap();
args['exerciseRepository'] = exerciseRepository;
args['exercise'] = exercise;
args['past'] = true;
Navigator.of(context).pushNamed('evaluationPage', arguments: args);
}
}
}

View File

@ -30,7 +30,7 @@ class _MyDevelopmentMuscleState extends State<MyDevelopmentMusclePage> with Comm
@override
void initState() {
super.initState();
if (!Cache().hasPurchased) {
if (!Cache().hasPurchased && Cache().userLoggedIn != null) {
Timer(
Duration(milliseconds: 2000),
() => {

View File

@ -99,19 +99,22 @@ class _MyExercisePlanPage extends State<MyExercisePlanPage> with Trans, Logging
image: "asset/image/exercise_plan_suggested.jpg",
left: 2,
onTap: () => {
Track().track(TrackingEvent.my_suggested_plan),
showDialog(
context: context,
builder: (BuildContext context) {
return DialogPremium(
unlocked: Cache().hasPurchased,
unlockRound: 2,
function: "Suggested Training Plan",
unlockedText: null,
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
);
})
if (Cache().userLoggedIn != null)
{
Track().track(TrackingEvent.my_suggested_plan),
showDialog(
context: context,
builder: (BuildContext context) {
return DialogPremium(
unlocked: Cache().hasPurchased,
unlockRound: 2,
function: "Suggested Training Plan",
unlockedText: null,
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
);
})
}
},
isLocked: true,
),
@ -128,51 +131,25 @@ class _MyExercisePlanPage extends State<MyExercisePlanPage> with Trans, Logging
image: "asset/image/exercise_plan_stars.jpg",
left: 5,
onTap: () => {
Track().track(TrackingEvent.my_special_plan),
showDialog(
context: context,
builder: (BuildContext context) {
return DialogPremium(
unlocked: Cache().hasPurchased,
unlockRound: 1,
function: "Training Programs",
unlockedText: null,
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
);
})
if (Cache().userLoggedIn != null)
{
Track().track(TrackingEvent.my_special_plan),
showDialog(
context: context,
builder: (BuildContext context) {
return DialogPremium(
unlocked: Cache().hasPurchased,
unlockRound: 1,
function: "Training Programs",
unlockedText: null,
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
);
})
}
},
isLocked: true,
),
/* ImageButton(
width: imageWidth,
textAlignment: Alignment.topLeft,
text: t("Star's Exercise Plan"),
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/exercise_plan_stars.jpg",
left: 5,
onTap: () => {
showDialog(
context: context,
builder: (BuildContext context) {
return DialogPremium(
unlocked: false,
unlockRound: 2,
function: "Star's Exercise Plan",
unlockedText: "",
onTap: () => {Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop()},
);
})
},
isLocked: true,
), */
hiddenPlanWidget(exerciseRepository),
hiddenTrainingWidget(),
]),

View File

@ -24,43 +24,42 @@ class TutorialWidget with Trans, Logging {
void tip(BuildContext context) {
setContext(context);
if (tooltip != null && tooltip!.isOpen) {
tooltip!.rebuild();
}
var renderBox = context.findRenderObject() as RenderBox;
final overlay = Overlay.of(context)!.context.findRenderObject() as RenderBox?;
var targetGlobalCenter = renderBox.localToGlobal(renderBox.size.center(Offset.zero), ancestor: overlay);
final TutorialBloc bloc = BlocProvider.of<TutorialBloc>(context);
if (tooltip != null && tooltip!.isOpen) {
tooltip!.rebuild();
}
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(targetGlobalCenter.dx - bloc.action!.bubbleX, targetGlobalCenter.dy - bloc.action!.bubbleY,
bloc.action!.bubbleWidth.toDouble(), bloc.action!.bubbleHeight.toDouble())
? 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 double mediaSize = MediaQuery.of(context).size.width;
final double mediaHeight = MediaQuery.of(context).size.width;
final double distortion = mediaHeight / bloc.mediaHeightBase;
double fontSize = 14;
if (mediaSize > 400) {
fontSize = 15;
} else if (mediaSize < 375) {
if (mediaSize > 800) {
fontSize = 16;
} else if (mediaSize < 600) {
fontSize = 13;
}
double calculatedTop = bloc.top! / distortion;
//-((1 - distortion) * 100 * (fontSize));
double calculatedTop = bloc.top != null ? bloc.top! : 20.0;
if (calculatedTop < 0) {
calculatedTop = 10;
}
print("Height: $mediaHeight, distortion: $distortion top: ${bloc.top!} calculated $calculatedTop");
print("Height: $mediaHeight, width: $mediaSize distortion: $distortion top: ${bloc.top!} calculated $calculatedTop");
print("targetCenter X ${targetGlobalCenter.dx}");
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+68
version: 1.1.14+71
environment:
sdk: ">=2.12.0 <3.0.0"