Open davidgtu opened 3 months ago
Looking at the log you provided I see that the dialog was to be displayed: flutter: upgrader: showTheDialog title: Update App?
I think UpgradeAlert
is too high in your widget tree because it need to be below MaterialApp
. This may help from the example:
return MaterialApp(
title: 'Upgrader Example',
home: UpgradeAlert(
child: Scaffold(
appBar: AppBar(title: const Text('Upgrader Example')),
body: const Center(child: Text('Checking...')),
),
),
);
I am facing same issue,
flutter: upgrader: response statusCode: 200
flutter: upgrader: UpgraderAppStore: version info: appStoreListingURL: https://apps.apple.com/in/app/colel-chabad-pushka/id1491701168?uo=4, appStoreVersion: 2.1.0, installedVersion: 1.0.0, isCriticalUpdate: null, minAppVersion: null, releaseNotes: - Share button
- Updated Settings Page
flutter: upgrader: need to evaluate version
flutter: upgrader: blocked: false
flutter: upgrader: debugDisplayAlways: true
flutter: upgrader: debugDisplayOnce: false
flutter: upgrader: hasAlerted: false
flutter: upgrader: shouldDisplayUpgrade: true
flutter: upgrader: shouldDisplayReleaseNotes: true
flutter: upgrader: current locale: en_US
flutter: upgrader: languageCode: en
flutter: upgrader: showTheDialog title: Update App?
flutter: upgrader: showTheDialog message: A new version of Pushka is available! Version 2.1.0 is now available-you have 1.0.0.
flutter: upgrader: showTheDialog releaseNotes: - Share button
My Code
MyAppProvider(
child: MaterialApp.router(
routerConfig: navigator.config(),
title: F.title,
locale: DevicePreview.locale(context),
builder: (context, child) {
return UpgradeAlert(
upgrader: Upgrader(
debugLogging: true,
debugDisplayAlways: true,
countryCode: 'US',
minAppVersion: '1.0.0',
languageCode: 'en',
messages: UpgraderMessages(
code: "en",
),
),
child: child ?? const Text('child'),
);
},
debugShowCheckedModeBanner: false,
theme: appTheme,
),
)
@davidgtu , kindly check this -
navigatorKey
in the MaterialApp.router
due to which the pop-up is not coming.
I was facing the same problem and it was fixed using navigatorKey
Thank you for making this package.
I'm trying to implement this feature into my app but I can't seem to see it working locally despite my logs saying otherwise.
In my attempt to test this, In my
pubspec.yaml
I tried to fake the version. My app is live with the version 3.22.2, and inpubspec.yaml
I switched it so something lower, 3.22.0, but it doesn't work.Here are my upgrader logs:
My assumption is that
shouldDisplayUpgrade
should mean it should display something, right? Is there anything blocking the dialog from displaying?I've added
UpgradeAlert
to the top-level of my app as well:am I missing something? Is there something in the background that I'm not aware of and wouldn't work just by faking the version?
Thank you all.