flip_card 0.4.0 copy "flip_card: ^0.4.0" to clipboard
flip_card: ^0.4.0 copied to clipboard

outdated

A component that provides flip card animation. It could be used for hide and show details of a product.

flip_card #

A component that provides flip card animation. It could be used for hide and show details of a product.

How to use #

import 'package:flip_card/flip_card.dart';

Create a flip card. The card will flip when touched

FlipCard(
  direction: FlipDirection.HORIZONTAL, // default
  front: Container(
        child: Text('Front'),
    ),
    back: Container(
        child: Text('Back'),
    ),
);

You can also configure the card to only flip when desired by using a GlobalKey to toggle the cards:

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'),
    ),
  );
}
833
likes
0
pub points
98%
popularity

Publisher

verified publisherbrunojurkovic.com

A component that provides flip card animation. It could be used for hide and show details of a product.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flip_card