larryaasen / upgrader

A Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
MIT License
547 stars 268 forks source link

Release notes not scrollable #262

Closed OutdatedGuy closed 1 year ago

OutdatedGuy commented 1 year ago

For big release notes, upgrader dialog only shows starting portion of it. i.e. it it not scrollable.

Shown release notes Actual release notes

NEW: - Introducing the new Global Subgroup. Meet 2 new people everyday. Nurture strong, trusting relationships for better mental health. ADDED: - Support for tablets. - Onboarding screen to give a walkthrough to new users. OTHER: - Made some UI adjustments. - Increased form interactivity and easy of use. - Minor bug fixes and performance improvements.

pubspec.lock:

upgrader:
  dependency: "direct main"
  description:
    name: upgrader
    sha256: "600eec301fd27b985a7cf223c0d8f70f1bca6290b959fa970e399bb4da6e8c8e"
    url: "https://pub.dev"
  source: hosted
  version: "6.0.1"

Code:

UpgradeAlert(
  upgrader: Upgrader(
    showIgnore: false,
    showLater: false,
    durationUntilAlertAgain: const Duration(),
    dialogStyle: Theme.of(context).platform == TargetPlatform.iOS ||
            Theme.of(context).platform == TargetPlatform.macOS
        ? UpgradeDialogStyle.cupertino
        : UpgradeDialogStyle.material,
  ),
  child: const MainScreen(),
),
larryaasen commented 1 year ago

Thanks for reporting this issue. I fixed this on the main branch and will release it soon.

OutdatedGuy commented 1 year ago

@larryaasen, thanks for the fix. Just a small doubt though.

https://github.com/larryaasen/upgrader/blob/9858ae923bc0eefa90b40ef8c70739e7403f66e5/lib/src/upgrader.dart#L641-L654

Instead of wrapping the scrollable content inside a constrained Container why not just set the scrollable property of AlertDialog to true.

image
AlertDialog(
  scrollable: true,
);
larryaasen commented 1 year ago

@OutdatedGuy Yes that also works, but has the downside that the height of the dialog extends to the SafeArea, and I wanted to constrain the height to a reasonable value so it wouldn't take up the entire screen.