placeholder_screen.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import 'package:flutter/material.dart';
  2. import '../../core/l10n/app_localizations.dart';
  3. /// 占位页面 — 用于骨架路由中替代真实业务页面
  4. /// 开发新功能时替换为实际 Screen
  5. class PlaceholderScreen extends StatelessWidget {
  6. const PlaceholderScreen({
  7. super.key,
  8. required this.title,
  9. this.icon,
  10. });
  11. final String title;
  12. final IconData? icon;
  13. @override
  14. Widget build(BuildContext context) {
  15. final theme = Theme.of(context);
  16. return Scaffold(
  17. appBar: AppBar(title: Text(title)),
  18. body: Center(
  19. child: Column(
  20. mainAxisSize: MainAxisSize.min,
  21. children: [
  22. Icon(
  23. icon ?? Icons.construction,
  24. size: 64,
  25. color: theme.colorScheme.primary.withAlpha(128),
  26. ),
  27. const SizedBox(height: 16),
  28. Text(
  29. title,
  30. style: theme.textTheme.titleLarge,
  31. ),
  32. const SizedBox(height: 8),
  33. Text(
  34. AppLocalizations.of(context)!.comingSoon,
  35. style: theme.textTheme.bodySmall,
  36. ),
  37. ],
  38. ),
  39. ),
  40. );
  41. }
  42. }