feat(ui): 底部导航栏添加文字标签
- 在图标下方添加文字标签(首页、行情、交易、资产、我的) - 激活状态文字加粗 - 支持主题切换 - 提升用户体验和可识别性
This commit is contained in:
@@ -273,7 +273,7 @@ class _NavItemWidget extends StatelessWidget {
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
padding: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
decoration: isSelected
|
||||
? BoxDecoration(
|
||||
color: colorScheme.primary.withOpacity(0.1),
|
||||
@@ -287,10 +287,24 @@ class _NavItemWidget extends StatelessWidget {
|
||||
],
|
||||
)
|
||||
: null,
|
||||
child: Icon(
|
||||
item.icon,
|
||||
color: color,
|
||||
size: 24,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
item.icon,
|
||||
color: color,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
item.label,
|
||||
style: TextStyle(
|
||||
color: color,
|
||||
fontSize: 12,
|
||||
fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user