mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-26 23:16:42 +00:00
handle only lifetime product case
This commit is contained in:
parent
9d04593479
commit
e24bd8b2ec
1 changed files with 26 additions and 21 deletions
|
@ -63,7 +63,10 @@ class _LightmeterProOfferingState extends State<LightmeterProOffering> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Stack(
|
if (!_isLifetimeOnly)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: Dimens.paddingS),
|
||||||
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
AnimatedOpacity(
|
AnimatedOpacity(
|
||||||
|
@ -84,7 +87,7 @@ class _LightmeterProOfferingState extends State<LightmeterProOffering> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: Dimens.grid8),
|
),
|
||||||
FilledButtonLarge(
|
FilledButtonLarge(
|
||||||
title: S.of(context).continuePurchase,
|
title: S.of(context).continuePurchase,
|
||||||
onPressed: _isLoading || selected != null ? _buyPro : null,
|
onPressed: _isLoading || selected != null ? _buyPro : null,
|
||||||
|
@ -94,6 +97,8 @@ class _LightmeterProOfferingState extends State<LightmeterProOffering> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get _isLifetimeOnly => lifetime != null && yearly == null && monthly == null;
|
||||||
|
|
||||||
void _selectProduct(IAPProduct product) {
|
void _selectProduct(IAPProduct product) {
|
||||||
if (!_isLoading) {
|
if (!_isLoading) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
Loading…
Reference in a new issue