Skip to content

Commit 36ed682

Browse files
committed
feat(status): add maintenance page for app downtime
- Create a new MaintenancePage widget to display when the app is in maintenance mode - Use UI kit components for consistent look and feel - Implement localized strings for headline and subheadline - Add padding and layout structure using Scaffold
1 parent 9cf9420 commit 36ed682

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

lib/status/view/maintenance_page.dart

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_news_app_mobile_client_full_source_code/l10n/l10n.dart';
3+
import 'package:ui_kit/ui_kit.dart';
4+
5+
/// A page displayed to the user when the application is in maintenance mode.
6+
///
7+
/// This is a simple, static page that informs the user that the app is
8+
/// temporarily unavailable and asks them to check back later. It's designed
9+
/// to be displayed globally, blocking access to all other app features.
10+
class MaintenancePage extends StatelessWidget {
11+
/// {@macro maintenance_page}
12+
const MaintenancePage({super.key});
13+
14+
@override
15+
Widget build(BuildContext context) {
16+
final l10n = context.l10n;
17+
18+
// The Scaffold provides the basic Material Design visual layout structure.
19+
return Scaffold(
20+
body: Padding(
21+
// Use consistent padding from the UI kit.
22+
padding: const EdgeInsets.all(AppSpacing.lg),
23+
// The InitialStateWidget from the UI kit is reused here to provide a
24+
// consistent look and feel for full-screen informational states.
25+
child: InitialStateWidget(
26+
icon: Icons.build_circle_outlined,
27+
headline: l10n.maintenanceHeadline,
28+
subheadline: l10n.maintenanceSubheadline,
29+
),
30+
),
31+
);
32+
}
33+
}

0 commit comments

Comments
 (0)