Reveal full next card behind opaque deck front
This commit is contained in:
@@ -101,6 +101,22 @@ void main() {
|
||||
)
|
||||
.first,
|
||||
);
|
||||
final surfaceColor =
|
||||
tester
|
||||
.widget<DecoratedBox>(
|
||||
find
|
||||
.descendant(
|
||||
of: find.byWidgetPredicate(
|
||||
(w) => w is ChatSwitchCard && w.outgoing,
|
||||
),
|
||||
matching: find.byType(DecoratedBox),
|
||||
)
|
||||
.first,
|
||||
)
|
||||
.decoration
|
||||
as BoxDecoration;
|
||||
expect(surfaceColor.color, isNotNull);
|
||||
expect(surfaceColor.color!.a, 1);
|
||||
expect(
|
||||
card.transform.entry(3, 2) != 0,
|
||||
{
|
||||
|
||||
@@ -28,6 +28,17 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
test('deck reveals a full-size next card behind the front card', () {
|
||||
for (final style in [
|
||||
QuickSwitchAnimation.cardStack,
|
||||
QuickSwitchAnimation.deckSlide,
|
||||
]) {
|
||||
for (final t in [0.0, .3, .5, 1.0]) {
|
||||
expect(quickSwitchRect(style, t, peek, full, outgoing: false), full);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('every style settles without residual transforms or missing cards', () {
|
||||
for (final style in QuickSwitchAnimation.values) {
|
||||
for (final outgoing in [true, false]) {
|
||||
|
||||
Reference in New Issue
Block a user