fix(flutter): 放大播放图标并加半透明底

This commit is contained in:
Zhou Weidong committed 2026-10-20 12:30:06 +08:00
1 parent 8013cc18ad
commit a72adcfc3f
2 files changed
+16 -9

No files matched your search

+8 -6
View File
@@ -6,7 +6,7 @@ import 'package:fruitshorts/core/theme/app_colors.dart';
import 'package:fruitshorts/pages/player/widgets/player_center_toggle.dart';
void main() {
testWidgets('should_use_one_shared_72px_transparent_toggle_style', (
testWidgets('should_use_one_shared_84px_translucent_toggle_style', (
tester,
) async {
await tester.pumpWidget(
@@ -34,16 +34,18 @@ void main() {
Key('test-center-toggle-a'),
Key('player-play-toggle'),
]) {
expect(tester.getSize(find.byKey(key)), const Size(72, 72));
// 暂停按钮改为透明背景,容器已不再绘制任何底色或装饰。
expect(
expect(tester.getSize(find.byKey(key)), const Size(84, 84));
// 圆形底改为半透明黑色,不再是完全透明或蓝色实底。
final container = tester.widget<Container>(
find.descendant(of: find.byKey(key), matching: find.byType(Container)),
findsNothing,
);
final decoration = container.decoration! as BoxDecoration;
expect(decoration.color, Colors.black26);
expect(decoration.shape, BoxShape.circle);
final icon = tester.widget<Icon>(
find.descendant(of: find.byKey(key), matching: find.byType(Icon)),
);
expect(icon.size, 40);
expect(icon.size, 48);
expect(icon.color, AppColors.onPrimary);
expect(icon.shadows, isNotNull);
expect(icon.shadows, isNotEmpty);