fix(flutter): 放大透明播放按钮
This commit is contained in:
1 parent
02763c3dfb
commit
8013cc18ad
2 files changed
+17
-6
No files matched your search
@@ -6,7 +6,9 @@ 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_52px_center_toggle_style', (tester) async {
|
||||
testWidgets('should_use_one_shared_72px_transparent_toggle_style', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
@@ -32,7 +34,7 @@ void main() {
|
||||
Key('test-center-toggle-a'),
|
||||
Key('player-play-toggle'),
|
||||
]) {
|
||||
expect(tester.getSize(find.byKey(key)), const Size(52, 52));
|
||||
expect(tester.getSize(find.byKey(key)), const Size(72, 72));
|
||||
// 暂停按钮改为透明背景,容器已不再绘制任何底色或装饰。
|
||||
expect(
|
||||
find.descendant(of: find.byKey(key), matching: find.byType(Container)),
|
||||
@@ -41,8 +43,10 @@ void main() {
|
||||
final icon = tester.widget<Icon>(
|
||||
find.descendant(of: find.byKey(key), matching: find.byType(Icon)),
|
||||
);
|
||||
expect(icon.size, 26);
|
||||
expect(icon.size, 40);
|
||||
expect(icon.color, AppColors.onPrimary);
|
||||
expect(icon.shadows, isNotNull);
|
||||
expect(icon.shadows, isNotEmpty);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user