diff --git a/lib/src/upgrade_announcer.dart b/lib/src/upgrade_announcer.dart index 407a5238..89327c0c 100644 --- a/lib/src/upgrade_announcer.dart +++ b/lib/src/upgrade_announcer.dart @@ -28,7 +28,7 @@ class UpgradeAnnouncer extends StatefulWidget { /// [Upgrader.minAppVersion] version final bool enforceUpgrade; final bool debugEnforceUpgrade; - final bool debugUpgrade; + final bool debugAvailableUpgrade; final Widget child; const UpgradeAnnouncer({ @@ -51,7 +51,7 @@ class UpgradeAnnouncer extends StatefulWidget { this.downloadIconColor, this.enforceUpgrade = false, this.debugEnforceUpgrade = false, - this.debugUpgrade = false, + this.debugAvailableUpgrade = false, required this.child, }); @@ -168,7 +168,7 @@ class _UpgradeAnnouncer extends State { appStoreVersion != null && installedVersion != null) { if (appStoreVersion > installedVersion || - (widget.debugUpgrade || widget.debugEnforceUpgrade)) { + (widget.debugAvailableUpgrade || widget.debugEnforceUpgrade)) { if (widget.enforceUpgrade || widget.debugEnforceUpgrade) { setState(() { _shouldEnforceUpgrade = diff --git a/test/upgrade_announcer_test.dart b/test/upgrade_announcer_test.dart index 51c2859c..c7254893 100644 --- a/test/upgrade_announcer_test.dart +++ b/test/upgrade_announcer_test.dart @@ -64,7 +64,7 @@ void main() { expect(find.text(UpgraderMessages().upgradeEnforce), findsOneWidget); }, skip: false); - testWidgets('Upgrade available; always shown; debugUpgrade', + testWidgets('Upgrade available; always shown; debugAvailableUpgrade', (WidgetTester tester) async { final client = MockITunesSearchClient.setupMockClient(); @@ -90,7 +90,7 @@ void main() { home: UpgradeAnnouncer( scaffoldMessengerKey: rootScaffoldMessengerKey, upgrader: upgrader, - debugUpgrade: true, + debugAvailableUpgrade: true, child: Scaffold( body: const Placeholder(), appBar: AppBar(title: const Text('Upgrader test')),