fix(flutter): 播放页改为透明叠层
This commit is contained in:
1 parent
d762511412
commit
0af68f2455
5 files changed
+60
-50
No files matched your search
@@ -187,16 +187,35 @@ void main() {
|
||||
final rail = tester.getRect(
|
||||
find.byKey(const Key('player-interaction-rail')),
|
||||
);
|
||||
expect(find.byKey(const Key('player-background')), findsNothing);
|
||||
final fallback = find.byKey(const Key('player-fallback-background'));
|
||||
if (fallback.evaluate().isNotEmpty) {
|
||||
expect(tester.widget<ColoredBox>(fallback).color, Colors.black);
|
||||
}
|
||||
expect(
|
||||
tester
|
||||
.widget<ColoredBox>(find.byKey(const Key('player-background')))
|
||||
.widget<Scaffold>(find.byKey(const Key('player-scaffold')))
|
||||
.backgroundColor,
|
||||
Colors.transparent,
|
||||
);
|
||||
expect(
|
||||
tester
|
||||
.widget<Container>(find.byKey(const Key('player-controls-top')))
|
||||
.decoration,
|
||||
isNull,
|
||||
);
|
||||
expect(
|
||||
tester
|
||||
.widget<Padding>(find.byKey(const Key('player-controls-bottom')))
|
||||
.child,
|
||||
isNotNull,
|
||||
);
|
||||
expect(
|
||||
tester
|
||||
.widget<Material>(find.byKey(const Key('player-episodes-pill')))
|
||||
.color,
|
||||
AppColors.playerBackground,
|
||||
AppColors.playerOverlayPill,
|
||||
);
|
||||
final panel = tester.widget<Container>(
|
||||
find.byKey(const Key('player-controls-bottom')),
|
||||
);
|
||||
expect((panel.decoration! as BoxDecoration).color, AppColors.playerPanel);
|
||||
|
||||
expect(bottom.height, lessThanOrEqualTo(200));
|
||||
expect(bottom.top, greaterThanOrEqualTo(screenHeight * 0.78));
|
||||
|
||||
Reference in new issue
Block a user