Files
smart-serow/pi/ui/lib/screens/splash_screen.dart

58 lines
1.7 KiB
Dart
Raw Permalink Normal View History

2026-01-25 18:47:35 +09:00
import 'package:flutter/material.dart';
import '../theme/app_theme.dart';
2026-01-25 18:47:35 +09:00
/// Splash screen - shown during initialization
2026-02-08 02:56:32 +09:00
///
/// Displays parallel status items that independently flip to "Ready".
2026-01-25 18:47:35 +09:00
class SplashScreen extends StatelessWidget {
2026-02-08 02:56:32 +09:00
final Map<String, String> statuses;
2026-01-25 18:47:35 +09:00
2026-02-08 02:56:32 +09:00
const SplashScreen({super.key, required this.statuses});
2026-01-25 18:47:35 +09:00
@override
Widget build(BuildContext context) {
final theme = AppTheme.of(context);
2026-01-25 18:47:35 +09:00
return Scaffold(
backgroundColor: theme.background,
2026-01-25 18:47:35 +09:00
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.terrain,
2026-01-26 11:35:17 +09:00
size: 240,
color: theme.subdued,
2026-01-26 11:35:17 +09:00
// replace with custom logo later
2026-01-25 18:47:35 +09:00
),
const SizedBox(height: 24),
Text(
'Smart Serow',
style: Theme.of(context).textTheme.headlineLarge?.copyWith(
2026-01-26 11:35:17 +09:00
fontSize: 160,
color: theme.foreground,
2026-01-25 18:47:35 +09:00
fontWeight: FontWeight.bold,
),
),
2026-02-08 02:56:32 +09:00
const SizedBox(height: 32),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: statuses.entries.map((entry) {
final isReady = entry.value == 'Ready';
return Text(
'${entry.key}: ${entry.value}',
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
fontSize: 48,
color: isReady ? theme.foreground : theme.subdued,
),
);
}).toList(),
2026-01-25 18:47:35 +09:00
),
],
),
),
);
}
}