This commit is contained in:
1 parent
dabff48f7c
commit
a7b4277536
2 files changed
+15
-6
No files matched your search
@@ -30,8 +30,8 @@ abstract final class AppColors {
|
||||
/// 首页及剧集播放页视频信息文案:参考设计图的 65% 半透明白。
|
||||
static const homeFeedVideoCopy = Color(0xA6FFFFFF);
|
||||
|
||||
/// 首页观看全集按钮:参考设计稿的中性深灰表面。
|
||||
static const watchAllSurface = Color(0xFF333333);
|
||||
/// 首页观看全集按钮:参考设计稿的按钮灰,并叠入品牌红暖调。
|
||||
static const watchAllSurface = Color(0xFF3B3434);
|
||||
|
||||
/// 主操作、选中态、播放进度。旧品牌橙已全量映射为品牌红(2026-10 改版)。
|
||||
static const blue = Color(0xFFF04E4E);
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:fruitshorts/core/data/models/drama.dart';
|
||||
import 'package:fruitshorts/core/theme/app_colors.dart';
|
||||
import 'package:fruitshorts/l10n/app_localizations.dart';
|
||||
import 'package:fruitshorts/pages/player/widgets/home_feed_recommend_panel.dart';
|
||||
|
||||
@@ -15,7 +16,6 @@ const _width = 280.0;
|
||||
const _sampleInset = 16;
|
||||
const _sampleY = 4;
|
||||
const _rgbaChannels = 4;
|
||||
const _surfaceChannel = 0.2;
|
||||
const _surfaceTolerance = 0.01;
|
||||
const _drama = Drama(
|
||||
id: 'surface',
|
||||
@@ -71,9 +71,18 @@ void main() {
|
||||
image.dispose();
|
||||
for (final sample in [left, middle, right]) {
|
||||
expect(sample.a, 1);
|
||||
expect(sample.r, closeTo(_surfaceChannel, _surfaceTolerance));
|
||||
expect(sample.g, closeTo(_surfaceChannel, _surfaceTolerance));
|
||||
expect(sample.b, closeTo(_surfaceChannel, _surfaceTolerance));
|
||||
expect(
|
||||
sample.r,
|
||||
closeTo(AppColors.watchAllSurface.r, _surfaceTolerance),
|
||||
);
|
||||
expect(
|
||||
sample.g,
|
||||
closeTo(AppColors.watchAllSurface.g, _surfaceTolerance),
|
||||
);
|
||||
expect(
|
||||
sample.b,
|
||||
closeTo(AppColors.watchAllSurface.b, _surfaceTolerance),
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user