feat(home): 顶部导航随翻页联动并把推荐更名为精选
This commit is contained in:
1 parent
2f4593a46e
commit
335e5dc286
27 files changed
+1095
-214
No files matched your search
@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
|
||||
import '../../../core/formatting/count_format.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/app_dimens.dart';
|
||||
import '../../../core/widgets/animated_nav_label.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
enum HomePrimaryTab {
|
||||
@@ -323,21 +324,16 @@ class _CategoryBarState extends State<_CategoryBar> {
|
||||
height: AppDimens.homePrimaryRowHeight,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: AnimatedDefaultTextStyle(
|
||||
child: AnimatedNavLabel(
|
||||
key: Key('home-primary-label-${category.categoryId}'),
|
||||
duration: AppDimens.homePrimaryTabAnimationDuration,
|
||||
curve: Curves.easeOut,
|
||||
style: TextStyle(
|
||||
color: selected
|
||||
? AppColors.navSelected
|
||||
: AppColors.textTabInactive,
|
||||
fontSize: selected
|
||||
? AppDimens.homePrimaryTabSelectedFont
|
||||
: AppDimens.homePrimaryTabFont,
|
||||
fontWeight: selected ? FontWeight.w700 : FontWeight.w400,
|
||||
label: category.label,
|
||||
selected: selected,
|
||||
alignment: Alignment.bottomLeft,
|
||||
style: const TextStyle(
|
||||
color: AppColors.navSelected,
|
||||
fontSize: AppDimens.homePrimaryTabSelectedFont,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
child: Text(category.label, textAlign: TextAlign.left),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user