WT1.1.3 build 2 iOS. Apple SignIn, Google SignIn
This commit is contained in:
@@ -12,7 +12,7 @@ class DialogPremium extends StatefulWidget {
|
||||
String description, function, unlockedText;
|
||||
final int unlockRound;
|
||||
|
||||
final bool unlocked;
|
||||
bool unlocked;
|
||||
|
||||
DialogPremium(
|
||||
{Key key,
|
||||
@@ -27,6 +27,8 @@ class DialogPremium extends StatefulWidget {
|
||||
description = description ?? "";
|
||||
function = function ?? "";
|
||||
unlockedText = unlockedText ?? "";
|
||||
|
||||
unlocked = true;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -88,9 +90,9 @@ class _DialogPremiumState extends State<DialogPremium> with Trans {
|
||||
alignment: AlignmentDirectional.topEnd,
|
||||
children: [
|
||||
Text(
|
||||
t("Go Premium") + " ",
|
||||
widget.unlocked ? t("Keep testing") : t("Go Premium") + " ",
|
||||
style: GoogleFonts.archivoBlack(
|
||||
fontSize: 24,
|
||||
fontSize: widget.unlocked ? 18 : 24,
|
||||
color: Colors.yellow[400],
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
@@ -106,32 +108,34 @@ class _DialogPremiumState extends State<DialogPremium> with Trans {
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 3,
|
||||
top: 0,
|
||||
child: AnimatedSwitcher(
|
||||
duration: Duration(milliseconds: 900),
|
||||
//reverseDuration: Duration(milliseconds: 200),
|
||||
transitionBuilder: (Widget child, Animation<double> animation) {
|
||||
return FadeTransition(child: child, opacity: animation);
|
||||
},
|
||||
child: isStart
|
||||
? Icon(
|
||||
CustomIcon.star_2,
|
||||
color: Colors.yellow[300],
|
||||
)
|
||||
: Offstage() /* Icon(
|
||||
!widget.unlocked
|
||||
? Positioned(
|
||||
right: 3,
|
||||
top: 0,
|
||||
child: AnimatedSwitcher(
|
||||
duration: Duration(milliseconds: 900),
|
||||
//reverseDuration: Duration(milliseconds: 200),
|
||||
transitionBuilder: (Widget child, Animation<double> animation) {
|
||||
return FadeTransition(child: child, opacity: animation);
|
||||
},
|
||||
child: isStart
|
||||
? Icon(
|
||||
CustomIcon.star_2,
|
||||
color: Colors.yellow[300],
|
||||
)
|
||||
: Offstage() /* Icon(
|
||||
CustomIcon.exclamation_circle,
|
||||
color: Colors.yellow[300],
|
||||
) */
|
||||
)),
|
||||
))
|
||||
: Offstage(),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 35,
|
||||
),
|
||||
Text(
|
||||
t("Unleash your potential with WorkoutTest Premium!"),
|
||||
widget.unlocked ? "" : t("Unleash your potential with WorkoutTest Premium!"),
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 14,
|
||||
color: Colors.white,
|
||||
@@ -160,7 +164,7 @@ class _DialogPremiumState extends State<DialogPremium> with Trans {
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: GestureDetector(
|
||||
onTap: () => Navigator.of(context).pushNamed("salesPage"),
|
||||
onTap: () => widget.unlocked ? Navigator.of(context).pop() : Navigator.of(context).pushNamed("salesPage"),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@@ -222,61 +226,60 @@ class _DialogPremiumState extends State<DialogPremium> with Trans {
|
||||
List<TextSpan> getDescriptionText() {
|
||||
List<TextSpan> list = List();
|
||||
|
||||
if (widget.unlocked) {
|
||||
/* if (widget.unlocked) {
|
||||
list.add(TextSpan(text: widget.unlockedText));
|
||||
} else {
|
||||
list.add(TextSpan(text: t("The")));
|
||||
list.add(TextSpan(text: t(" ")));
|
||||
list.add(
|
||||
TextSpan(
|
||||
text: t(widget.function),
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.yellow[300],
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(5.0, 5.0),
|
||||
blurRadius: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(-3.0, 3.0),
|
||||
blurRadius: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
],
|
||||
),
|
||||
} */
|
||||
list.add(TextSpan(text: t("The")));
|
||||
list.add(TextSpan(text: t(" ")));
|
||||
list.add(
|
||||
TextSpan(
|
||||
text: t(widget.function),
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.yellow[300],
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(5.0, 5.0),
|
||||
blurRadius: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(-3.0, 3.0),
|
||||
blurRadius: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
list.add(TextSpan(text: t(" ")));
|
||||
list.add(TextSpan(text: t("feature is reachable after you finished")));
|
||||
list.add(TextSpan(text: t(" ")));
|
||||
list.add(
|
||||
TextSpan(
|
||||
text: widget.unlockRound == 1 ? t("the first") : t("the second"),
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.yellow[300],
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(5.0, 5.0),
|
||||
blurRadius: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(-3.0, 3.0),
|
||||
blurRadius: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
list.add(TextSpan(text: t(" ")));
|
||||
list.add(TextSpan(text: t("feature is reachable after you finished")));
|
||||
list.add(TextSpan(text: t(" ")));
|
||||
list.add(
|
||||
TextSpan(
|
||||
text: widget.unlockRound == 1 ? t("the first") : t("the second"),
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.yellow[300],
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(5.0, 5.0),
|
||||
blurRadius: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(-3.0, 3.0),
|
||||
blurRadius: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
list.add(TextSpan(text: t(" ")));
|
||||
list.add(TextSpan(text: t("100% test circles")));
|
||||
}
|
||||
),
|
||||
);
|
||||
list.add(TextSpan(text: t(" ")));
|
||||
list.add(TextSpan(text: t("100% test circles")));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,6 @@ class _HomePageState extends State<AitrainerHome> with Logging {
|
||||
@override
|
||||
void dispose() async {
|
||||
super.dispose();
|
||||
await PlatformPurchaseApi().close();
|
||||
//await PlatformPurchaseApi().close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class ImageButton extends StatelessWidget {
|
||||
//print("Top: " + top.toStringAsFixed(0) + " length: " + ((style.fontSize - 5) * text.length).toString());
|
||||
}
|
||||
final double width = MediaQuery.of(context).size.width;
|
||||
print("Mediawidth: " + width.toStringAsFixed(0));
|
||||
//print("Mediawidth: " + width.toStringAsFixed(0));
|
||||
return Stack(alignment: AlignmentDirectional.bottomStart, children: [
|
||||
FlatButton(
|
||||
child: image == null
|
||||
@@ -152,11 +152,11 @@ class ImageButton extends StatelessWidget {
|
||||
imageName,
|
||||
fit: BoxFit.fitWidth,
|
||||
alignment: Alignment.center,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
String url = Cache.mediaUrl + '/' + imageName; //.substring(11);
|
||||
/* errorBuilder: (context, error, stackTrace) {
|
||||
String url = Cache.mediaUrl + imageName; //.substring(11);
|
||||
Widget image = FadeInImage.assetNetwork(placeholder: 'asset/image/dots.gif', image: url, height: this.height);
|
||||
return image;
|
||||
},
|
||||
}, */
|
||||
);
|
||||
} on Exception catch (_) {
|
||||
String url = Cache.mediaUrl + '/images/' + imageName;
|
||||
|
||||
Reference in New Issue
Block a user