Adjust change plans button logic
This commit is contained in:
parent
b92cdc6ab9
commit
178d84ac8b
|
|
@ -366,11 +366,13 @@ class _AccountOverview extends StatelessWidget {
|
||||||
),
|
),
|
||||||
if (state.isHosted) ...[
|
if (state.isHosted) ...[
|
||||||
if (state.isProPlan && account.hasIapPlan)
|
if (state.isProPlan && account.hasIapPlan)
|
||||||
SizedBox()
|
Padding(
|
||||||
else if (state.isProPlan &&
|
padding: const EdgeInsets.all(20),
|
||||||
!account.hasIapPlan &&
|
child: Text(
|
||||||
supportsInAppPurchase())
|
localization.useMobileToManagePlan,
|
||||||
SizedBox()
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
)
|
||||||
else
|
else
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 16, top: 16, right: 16),
|
padding: const EdgeInsets.only(left: 16, top: 16, right: 16),
|
||||||
|
|
@ -387,7 +389,7 @@ class _AccountOverview extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (supportsInAppPurchase()) {
|
if (supportsInAppPurchase() && !account.hasIapPlan) {
|
||||||
showDialog<void>(
|
showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => UpgradeDialog(),
|
builder: (context) => UpgradeDialog(),
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
static final Map<String, Map<String, String>> _localizedValues = {
|
static final Map<String, Map<String, String>> _localizedValues = {
|
||||||
'en': {
|
'en': {
|
||||||
// STARTER: lang key - do not remove comment
|
// STARTER: lang key - do not remove comment
|
||||||
|
'use_mobile_to_manage_plan':
|
||||||
|
'Use your phone subscription settings to manage your plan',
|
||||||
'show_task_billable': 'Show Task Billable',
|
'show_task_billable': 'Show Task Billable',
|
||||||
'credit_item': 'Credit Item',
|
'credit_item': 'Credit Item',
|
||||||
'drop_file_here': 'Drop file here',
|
'drop_file_here': 'Drop file here',
|
||||||
|
|
@ -103261,6 +103263,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
_localizedValues[localeCode]['show_task_billable'] ??
|
_localizedValues[localeCode]['show_task_billable'] ??
|
||||||
_localizedValues['en']['show_task_billable'];
|
_localizedValues['en']['show_task_billable'];
|
||||||
|
|
||||||
|
String get useMobileToManagePlan =>
|
||||||
|
_localizedValues[localeCode]['use_mobile_to_manage_plan'] ??
|
||||||
|
_localizedValues['en']['use_mobile_to_manage_plan'];
|
||||||
|
|
||||||
// STARTER: lang field - do not remove comment
|
// STARTER: lang field - do not remove comment
|
||||||
|
|
||||||
String lookup(String key) {
|
String lookup(String key) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue