Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Added open store method and force app version field #75

Merged
merged 3 commits into from
Jan 13, 2022

Conversation

2shrestha22
Copy link
Contributor

@2shrestha22 2shrestha22 commented Dec 7, 2021

Some user (including me) may want to open store link manually without needing to show dialog, similar to the advanced example where user manually open dialog.

OutlinedButton.icon(
  style: OutlinedButton.styleFrom(
    primary: AppColor.scaffoldBackground,
    side: const BorderSide(
      color: AppColor.scaffoldBackground,
    ),
  ),
  onPressed: () {
    //update app
    _newVersion.openStore(versionStatus);
  },
  icon: const Icon(Icons.cloud_download_outlined),
  label: const Text('Update now'), // TODO: translation
);

Also I have added forceAppVersion field so we can test by manually setting store app version.

final _newVersion = NewVersion(forceAppVersion: '2.2.3');

@timtraversy
Copy link
Owner

Thanks! I like both these changes a lot. My only thought is that the plugin now has _launchAppStore and openStore functions. I want to either combine those or name them more clearly.

@2shrestha22
Copy link
Contributor Author

2shrestha22 commented Dec 9, 2021

Sure, I will change them as needed.

@2shrestha22
Copy link
Contributor Author

2shrestha22 commented Dec 10, 2021

@timtraversy I have changed it as needed. Please have a look. Sorry for delay.
edit: I forgot to make launchAppStore() take VersionStatus but I think appStoreLink is also fine. What do you think?

Copy link
Owner

@timtraversy timtraversy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, LGTM

@timtraversy timtraversy merged commit 278e57c into timtraversy:master Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants