fix(home): 放大搜索栏右侧图标
This commit is contained in:
1 parent
f4e5af19fe
commit
8feede1763
4 files changed
+29
-8
No files matched your search
@@ -1115,7 +1115,7 @@ $ flutter test
|
||||
- 四类卡片去底板/描边,封面统一 3:4、8 圆角、行距 10、封底标题间距 6;状态角标为右上角紧凑异形丝带。
|
||||
- 标题下方恢复左对齐题材文字,使用 `|` 分隔、灰色小字,与封面状态角标保持独立。
|
||||
- 首页搜索栏到一级、一级到二级、二级到网格间距为 8/8/10;非精选 tab 直接以 10 衔接网格。
|
||||
- 搜索框右侧皇冠与礼物改为 40 热区、24 彩色图标,透明背景、间距 12,保留礼物角标。
|
||||
- 搜索框右侧皇冠与礼物改为 40 热区、28 彩色图标,透明背景、间距 12,保留礼物角标。
|
||||
- 播放量贴封面右下角(底 2、右 6),火焰图标 11 + 12/w400 纯文字,间距 4,并保留极淡底部渐变。
|
||||
- 修复二级 chip 运行时颜色误用 `const TextStyle` 的编译错误,并校正相关测试 Finder 类型。
|
||||
- 全部短剧的地区、字幕、配音筛选 UI 已占位;以下接口待补:地区、字幕/配音筛选数据。
|
||||
@@ -126,7 +126,7 @@ abstract final class AppDimens {
|
||||
static const double homeSecondaryGridGap = 10;
|
||||
static const double homeHeaderIcon = 22;
|
||||
static const double homeActionSlot = 40;
|
||||
static const double homeActionIcon = 24;
|
||||
static const double homeActionIcon = 28;
|
||||
static const double homeActionGap = 12;
|
||||
|
||||
/// 推荐分区。
|
||||
|
||||
@@ -142,6 +142,7 @@ class HomeGridHeader extends StatelessWidget {
|
||||
const SizedBox(width: AppDimens.spaceSm),
|
||||
_headerAction(
|
||||
key: const Key('home-vip-entry'),
|
||||
frameKey: const Key('home-vip-icon-frame'),
|
||||
icon: Icons.workspace_premium_outlined,
|
||||
color: AppColors.homeCrownGold,
|
||||
tooltip: l10n.vipMembership,
|
||||
@@ -150,6 +151,7 @@ class HomeGridHeader extends StatelessWidget {
|
||||
const SizedBox(width: AppDimens.homeActionGap),
|
||||
_headerAction(
|
||||
key: const Key('home-wallet-entry'),
|
||||
frameKey: const Key('home-wallet-icon-frame'),
|
||||
icon: Icons.card_giftcard_rounded,
|
||||
color: AppColors.homeGiftPink,
|
||||
tooltip: l10n.wallet,
|
||||
@@ -163,6 +165,7 @@ class HomeGridHeader extends StatelessWidget {
|
||||
|
||||
Widget _headerAction({
|
||||
required Key key,
|
||||
required Key frameKey,
|
||||
required IconData icon,
|
||||
required Color color,
|
||||
required String tooltip,
|
||||
@@ -182,10 +185,16 @@ class HomeGridHeader extends StatelessWidget {
|
||||
child: InkWell(
|
||||
key: key,
|
||||
onTap: onTap,
|
||||
child: Icon(
|
||||
icon,
|
||||
size: AppDimens.homeActionIcon,
|
||||
color: color,
|
||||
child: Center(
|
||||
child: SizedBox.square(
|
||||
key: frameKey,
|
||||
dimension: AppDimens.homeActionIcon,
|
||||
child: Icon(
|
||||
icon,
|
||||
size: AppDimens.homeActionIcon,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -194,8 +203,8 @@ class HomeGridHeader extends StatelessWidget {
|
||||
if (badge != null && badge > 0)
|
||||
Positioned(
|
||||
key: const Key('home-wallet-badge'),
|
||||
top: -5,
|
||||
right: -6,
|
||||
top: 0,
|
||||
right: 0,
|
||||
child: Container(
|
||||
constraints: const BoxConstraints(minWidth: 20, minHeight: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
|
||||
@@ -62,6 +62,18 @@ void main() {
|
||||
tester.getSize(walletEntry),
|
||||
const Size.square(AppDimens.homeActionSlot),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('home-vip-icon-frame'))),
|
||||
const Size.square(AppDimens.homeActionIcon),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('home-wallet-icon-frame'))),
|
||||
const Size.square(AppDimens.homeActionIcon),
|
||||
);
|
||||
expect(
|
||||
tester.getCenter(find.byKey(const Key('home-vip-icon-frame'))).dy,
|
||||
tester.getCenter(find.byKey(const Key('home-wallet-icon-frame'))).dy,
|
||||
);
|
||||
expect(
|
||||
tester.getCenter(vipEntry).dy,
|
||||
closeTo(tester.getCenter(searchEntry).dy, 0.1),
|
||||
|
||||
Reference in new issue
Block a user