Add quick switch motion library with true deck exchanges

This commit is contained in:
2026-11-07 19:36:48 +00:00
parent fc4aa1652f
commit 3b44c49679
7 changed files with 277 additions and 44 deletions
@@ -50,10 +50,9 @@ void main() {
addTearDown(tester.view.reset);
}
for (final style in [
QuickSwitchAnimation.swap,
QuickSwitchAnimation.cardStack,
]) {
for (final style in QuickSwitchAnimation.values.where(
(style) => style != QuickSwitchAnimation.tape,
)) {
testWidgets('${style.name} exchanges depth without recreating drafts', (
tester,
) async {
@@ -94,7 +93,12 @@ void main() {
);
expect(
card.transform.entry(3, 2) != 0,
style == QuickSwitchAnimation.cardStack,
{
QuickSwitchAnimation.cardStack,
QuickSwitchAnimation.deckSlide,
QuickSwitchAnimation.flip,
QuickSwitchAnimation.rolodex,
}.contains(style),
);
await tester.pump(const Duration(milliseconds: 210));
expect(