WT1.1.0+42 error fixes

This commit is contained in:
bossanyit
2020-12-30 21:50:11 +01:00
parent 2aecb9d431
commit 14b5b44347
14 changed files with 142 additions and 99 deletions
+11 -9
View File
@@ -209,15 +209,17 @@ class _ExerciseLogPage extends State<ExerciseLogPage> with Trans, Common {
evaluation();
},
),
GestureDetector(
child: Image.asset(
'asset/image/lock.png',
height: 25,
width: 25,
),
onTap: () {
evaluation();
}),
Cache().hasPurchased
? Offstage()
: GestureDetector(
child: Image.asset(
'asset/image/lock.png',
height: 25,
width: 25,
),
onTap: () {
evaluation();
}),
],
),
IconButton(
+20 -18
View File
@@ -26,24 +26,26 @@ class _MyDevelopmentBodyPage extends State<MyDevelopmentBodyPage> with Trans, Co
@override
void initState() {
super.initState();
Timer(
Duration(milliseconds: 2000),
() => {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
setContext(context);
return DialogPremium(
unlocked: false,
unlockRound: 2,
function: "My Whole Body Development",
unlockedText: "",
onTap: () => {Navigator.of(context).pop(), Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop(), Navigator.of(context).pop()},
);
})
});
if (!Cache().hasPurchased) {
Timer(
Duration(milliseconds: 2000),
() => {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
setContext(context);
return DialogPremium(
unlocked: false,
unlockRound: 2,
function: "My Whole Body Development",
unlockedText: "",
onTap: () => {Navigator.of(context).pop(), Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop(), Navigator.of(context).pop()},
);
})
});
}
/// We require the initializers to run after the loading screen is rendered
SchedulerBinding.instance.addPostFrameCallback((_) {
+24 -17
View File
@@ -1,5 +1,6 @@
import 'dart:async';
import 'dart:collection';
import 'package:aitrainer_app/model/cache.dart';
import 'package:aitrainer_app/util/trans.dart';
import 'package:aitrainer_app/widgets/app_bar.dart';
import 'package:aitrainer_app/widgets/dialog_premium.dart';
@@ -30,23 +31,25 @@ class _MyDevelopmentMuscleState extends State<MyDevelopmentMusclePage> with Comm
@override
void initState() {
super.initState();
Timer(
Duration(milliseconds: 2000),
() => {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return DialogPremium(
unlocked: false,
unlockRound: 1,
function: "Development Of Muscles",
unlockedText: "",
onTap: () => {Navigator.of(context).pop(), Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop(), Navigator.of(context).pop()},
);
})
});
if (!Cache().hasPurchased) {
Timer(
Duration(milliseconds: 2000),
() => {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return DialogPremium(
unlocked: false,
unlockRound: 1,
function: "Development Of Muscles",
unlockedText: "",
onTap: () => {Navigator.of(context).pop(), Navigator.of(context).pop()},
onCancel: () => {Navigator.of(context).pop(), Navigator.of(context).pop()},
);
})
});
}
/// We require the initializers to run after the loading screen is rendered
SchedulerBinding.instance.addPostFrameCallback((_) {
@@ -166,6 +169,7 @@ class _MyDevelopmentMuscleState extends State<MyDevelopmentMusclePage> with Comm
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
ChoiceChip(
labelPadding: EdgeInsets.only(right: 5),
avatar: Icon(Icons.timer),
label: Text(t('Detailed')),
labelStyle: TextStyle(fontSize: 9, color: Colors.black),
@@ -175,6 +179,7 @@ class _MyDevelopmentMuscleState extends State<MyDevelopmentMusclePage> with Comm
onSelected: (value) => {bloc.add(DevelopmentByMuscleDateRateChange(dateRate: DateRate.daily))},
),
ChoiceChip(
labelPadding: EdgeInsets.only(right: 5),
avatar: Icon(Icons.timer),
label: Text(t('Weekly')),
labelStyle: TextStyle(fontSize: 9, color: Colors.black),
@@ -185,6 +190,7 @@ class _MyDevelopmentMuscleState extends State<MyDevelopmentMusclePage> with Comm
onSelected: (value) => {bloc.add(DevelopmentByMuscleDateRateChange(dateRate: DateRate.weekly))},
),
ChoiceChip(
labelPadding: EdgeInsets.only(right: 5),
avatar: Icon(Icons.timer),
label: Text(t('Monthly')),
labelStyle: TextStyle(fontSize: 9, color: Colors.black),
@@ -194,6 +200,7 @@ class _MyDevelopmentMuscleState extends State<MyDevelopmentMusclePage> with Comm
onSelected: (value) => {bloc.add(DevelopmentByMuscleDateRateChange(dateRate: DateRate.monthly))},
),
ChoiceChip(
labelPadding: EdgeInsets.only(right: 5),
avatar: Icon(Icons.timer),
label: Text(t('Yearly')),
labelStyle: TextStyle(fontSize: 9, color: Colors.black),
+4 -7
View File
@@ -48,7 +48,7 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/edzesnaplom400400.jpg",
@@ -62,10 +62,7 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
text: t("My Whole Body Development"),
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4)),
fontSize: 14, color: Colors.white, fontWeight: FontWeight.bold, backgroundColor: Colors.black54.withOpacity(0.4)),
),
image: "asset/image/testemfejl400x400.jpg",
left: 5,
@@ -82,7 +79,7 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/izomcsop400400.jpg",
@@ -98,7 +95,7 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/predictions.jpg",
+6 -6
View File
@@ -47,7 +47,7 @@ class _MyExercisePlanPage extends State<MyExercisePlanPage> with Trans, Logging
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/exercise_plan_execute.jpg",
@@ -66,7 +66,7 @@ class _MyExercisePlanPage extends State<MyExercisePlanPage> with Trans, Logging
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/exercise_plan_custom.jpg",
@@ -85,11 +85,11 @@ class _MyExercisePlanPage extends State<MyExercisePlanPage> with Trans, Logging
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/exercise_plan_suggested.jpg",
left: 5,
left: 2,
onTap: () => {
showDialog(
context: context,
@@ -113,7 +113,7 @@ class _MyExercisePlanPage extends State<MyExercisePlanPage> with Trans, Logging
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/exercise_plan_special.jpg",
@@ -141,7 +141,7 @@ class _MyExercisePlanPage extends State<MyExercisePlanPage> with Trans, Logging
style: GoogleFonts.robotoMono(
textStyle: TextStyle(
fontSize: 14,
color: Colors.orange,
color: Colors.white,
fontWeight: FontWeight.bold,
backgroundColor: Colors.black54.withOpacity(0.4))),
image: "asset/image/exercise_plan_stars.jpg",