style: 导航栏去掉蓝色药丸背景,改为图标/文字高亮
- indicatorColor: transparent 去掉 Material 3 默认的选中背景 - 选中项:图标 + 文字改为 primary 紫色,字重 w600 - 未选中项:图标 + 文字灰色 (textSecondary),字重 w400 - 与微信/支付宝/飞书的导航栏风格一致 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6a84519090
commit
4651291468
|
|
@ -29,6 +29,30 @@ class AppTheme {
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
navigationBarTheme: NavigationBarThemeData(
|
||||||
|
backgroundColor: AppColors.surface,
|
||||||
|
indicatorColor: Colors.transparent,
|
||||||
|
labelTextStyle: WidgetStateProperty.resolveWith((states) {
|
||||||
|
if (states.contains(WidgetState.selected)) {
|
||||||
|
return const TextStyle(
|
||||||
|
fontSize: 11,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColors.primary,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const TextStyle(
|
||||||
|
fontSize: 11,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
color: AppColors.textSecondary,
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
iconTheme: WidgetStateProperty.resolveWith((states) {
|
||||||
|
if (states.contains(WidgetState.selected)) {
|
||||||
|
return const IconThemeData(color: AppColors.primary, size: 24);
|
||||||
|
}
|
||||||
|
return const IconThemeData(color: AppColors.textSecondary, size: 24);
|
||||||
|
}),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
static ThemeData get lightTheme => ThemeData(
|
static ThemeData get lightTheme => ThemeData(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue