2026-01-25 18:47:35 +09:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
2026-01-26 00:20:52 +09:00
|
|
|
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) {
|
2026-01-26 00:20:52 +09:00
|
|
|
final theme = AppTheme.of(context);
|
|
|
|
|
|
2026-01-25 18:47:35 +09:00
|
|
|
return Scaffold(
|
2026-01-26 00:20:52 +09:00
|
|
|
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,
|
2026-01-26 00:20:52 +09:00
|
|
|
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,
|
2026-01-26 00:20:52 +09:00
|
|
|
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
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|