fix(flutter): 更多面板倍速清晰度改为单行排列

This commit is contained in:
Zhou Weidong committed 2026-10-20 11:44:42 +08:00
1 parent 1e3e5b64dc
commit f083a161e6
2 files changed
+118 -25

No files matched your search

+52
View File
@@ -398,6 +398,30 @@ void main() {
tester.getSize(find.byKey(const Key('player-more-speed-1.0'))).height,
28,
);
expect(
tester.getSize(find.byKey(const Key('player-more-speed-row'))).height,
44,
);
expect(
tester.getSize(find.byKey(const Key('player-more-quality-row'))).height,
44,
);
expect(
tester
.widget<SingleChildScrollView>(
find.byKey(const Key('player-more-speed')),
)
.scrollDirection,
Axis.horizontal,
);
expect(
tester
.widget<SingleChildScrollView>(
find.byKey(const Key('player-more-quality')),
)
.scrollDirection,
Axis.horizontal,
);
expect(
tester
.widget<Text>(
@@ -410,6 +434,34 @@ void main() {
?.fontSize,
12,
);
await tester.ensureVisible(find.byKey(const Key('player-more-speed-1.5')));
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('player-more-speed-1.5')));
await tester.pumpAndSettle();
expect(
tester
.widget<Text>(
find.descendant(
of: find.byKey(const Key('player-more-speed-1.5')),
matching: find.text('1.5x'),
),
)
.style
?.fontWeight,
FontWeight.w700,
);
expect(
tester
.widget<Text>(
find.descendant(
of: find.byKey(const Key('player-more-speed-1.0')),
matching: find.text('1.0x'),
),
)
.style
?.fontWeight,
FontWeight.w500,
);
});
testWidgets('should_disable_quality_not_supplied_by_ticket', (tester) async {