Skip to content

Commit a813245

Browse files
committed
feat(status): add version info to update required page
- Add currentAppVersion and latestRequiredVersion parameters to UpdateRequiredPage - Display current and latest required version information below the update message - Use l10n for localized version labels - Add conditional rendering to show version info only when both values are provided
1 parent a0f0369 commit a813245

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

lib/status/view/update_required_page.dart

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class UpdateRequiredPage extends StatelessWidget {
1616
const UpdateRequiredPage({
1717
required this.iosUpdateUrl,
1818
required this.androidUpdateUrl,
19+
required this.currentAppVersion,
20+
required this.latestRequiredVersion,
1921
super.key,
2022
});
2123

@@ -25,6 +27,12 @@ class UpdateRequiredPage extends StatelessWidget {
2527
/// The URL to open for Android app updates.
2628
final String androidUpdateUrl;
2729

30+
/// The current version of the application.
31+
final String? currentAppVersion;
32+
33+
/// The latest required version of the application.
34+
final String? latestRequiredVersion;
35+
2836
@override
2937
Widget build(BuildContext context) {
3038
final l10n = context.l10n;
@@ -54,6 +62,19 @@ class UpdateRequiredPage extends StatelessWidget {
5462
style: theme.textTheme.bodyLarge,
5563
textAlign: TextAlign.center,
5664
),
65+
if (currentAppVersion != null && latestRequiredVersion != null) ...[
66+
const SizedBox(height: AppSpacing.md),
67+
Text(
68+
l10n.currentAppVersionLabel(currentAppVersion!),
69+
style: theme.textTheme.bodySmall,
70+
textAlign: TextAlign.center,
71+
),
72+
Text(
73+
l10n.latestRequiredVersionLabel(latestRequiredVersion!),
74+
style: theme.textTheme.bodySmall,
75+
textAlign: TextAlign.center,
76+
),
77+
],
5778
const SizedBox(height: AppSpacing.xl),
5879
if (!kIsWeb) ...[
5980
// Show platform-specific update buttons for mobile

0 commit comments

Comments
 (0)