feat: add bottom navigation shell with study/manage/stats/account tabs

This commit is contained in:
pluv committed 2026-10-24 01:06:49 +08:00
1 parent 500c69bf33
commit 277ead9fe7
8 files changed
+247 -125

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
import 'package:flutter/material.dart';
/// 各主页面共用的占位内容:一个图标、一句标题和可选说明。
///
/// 页面接上真实业务后可以直接替换掉。
class EmptyState extends StatelessWidget {
const EmptyState({
required this.icon,
required this.title,
this.message,
super.key,
});
final IconData icon;
final String title;
final String? message;
@override
Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context);
final String? message = this.message;
return Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(icon, size: 56, color: theme.colorScheme.primary),
const SizedBox(height: 16),
Text(
title,
style: theme.textTheme.titleMedium,
textAlign: TextAlign.center,
),
if (message != null) ...<Widget>[
const SizedBox(height: 8),
Text(
message,
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),
textAlign: TextAlign.center,
),
],
],
),
),
);
}
}