Skip to content

Instantly share code, notes, and snippets.

@AlabasterAxe
Last active November 14, 2020 21:20
Show Gist options
  • Save AlabasterAxe/6075f308ad18932ce298e61bde0a6d94 to your computer and use it in GitHub Desktop.
Save AlabasterAxe/6075f308ad18932ce298e61bde0a6d94 to your computer and use it in GitHub Desktop.
AnimatedBuilder(
animation: cardSwipeAnimationController,
builder: (context, snapshot) {
Offset translateOffset = Offset.fromDirection(direction, cardAnimationController.value);
return Transform.translate(
offset: Offset(translateOffset.dx, 0),
child: Card(
child: Center(
child: Text("${widget.displayNumber}",
style: TextStyle(fontSize: 40)))));
},
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment