flipOnTouch property
When enabled, the card will flip automatically when touched. This behavior can be disabled if this is not desired. To manually flip a card from your code, you could do this:
GlobalKey<FlipCardState> cardKey = GlobalKey<FlipCardState>();
@override
Widget build(BuildContext context) {
return FlipCard(
key: cardKey,
flipOnTouch: false,
front: Container(
child: RaisedButton(
onPressed: () => cardKey.currentState.toggleCard(),
child: Text('Toggle'),
),
),
back: Container(
child: Text('Back'),
),
);
}
Implementation
final bool flipOnTouch;