merge: 合并 K33 暂停按钮尺寸调整

This commit is contained in:
Zhou Weidong committed 2026-10-20 14:41:27 +08:00
commit 1cb4c56261
2 files changed
+5 -5

No files matched your search

@@ -4,8 +4,8 @@ import 'package:flutter/material.dart';
import '../../../core/theme/app_colors.dart'; import '../../../core/theme/app_colors.dart';
const double _toggleSize = 84; const double _toggleSize = 68;
const double _iconSize = 48; const double _iconSize = 36;
const Color _toggleBackground = Colors.black26; const Color _toggleBackground = Colors.black26;
const List<Shadow> _iconShadows = [ const List<Shadow> _iconShadows = [
Shadow(color: Colors.black54, blurRadius: 12), Shadow(color: Colors.black54, blurRadius: 12),
+3 -3
View File
@@ -6,7 +6,7 @@ import 'package:fruitshorts/core/theme/app_colors.dart';
import 'package:fruitshorts/pages/player/widgets/player_center_toggle.dart'; import 'package:fruitshorts/pages/player/widgets/player_center_toggle.dart';
void main() { void main() {
testWidgets('should_use_one_shared_84px_translucent_toggle_style', ( testWidgets('should_use_one_shared_68px_translucent_toggle_style', (
tester, tester,
) async { ) async {
await tester.pumpWidget( await tester.pumpWidget(
@@ -34,7 +34,7 @@ void main() {
Key('test-center-toggle-a'), Key('test-center-toggle-a'),
Key('player-play-toggle'), Key('player-play-toggle'),
]) { ]) {
expect(tester.getSize(find.byKey(key)), const Size(84, 84)); expect(tester.getSize(find.byKey(key)), const Size(68, 68));
// 圆形底改为半透明黑色,不再是完全透明或蓝色实底。 // 圆形底改为半透明黑色,不再是完全透明或蓝色实底。
final container = tester.widget<Container>( final container = tester.widget<Container>(
find.descendant(of: find.byKey(key), matching: find.byType(Container)), find.descendant(of: find.byKey(key), matching: find.byType(Container)),
@@ -45,7 +45,7 @@ void main() {
final icon = tester.widget<Icon>( final icon = tester.widget<Icon>(
find.descendant(of: find.byKey(key), matching: find.byType(Icon)), find.descendant(of: find.byKey(key), matching: find.byType(Icon)),
); );
expect(icon.size, 48); expect(icon.size, 36);
expect(icon.color, AppColors.onPrimary); expect(icon.color, AppColors.onPrimary);
expect(icon.shadows, isNotNull); expect(icon.shadows, isNotNull);
expect(icon.shadows, isNotEmpty); expect(icon.shadows, isNotEmpty);