swipeable_tinder_card

A card stack that can be swiped left and right

Usage

dependencies:
    swipeable_tinder_card: 1.0.0    

#Install It You can install packages from the command line: with flutter:

$ flutter pub get

#Import it

import 'package:swipeable_tinder_card/swipeable_tinder_card.dart';

#Usage

  void loadCards(){
    cards = [
      SwipeableCard card = SwipeableCard(child: Stack(children: <Widget>[
        ClipRRect(child: Image(image: NetworkImage(picture), fit: BoxFit.cover, width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height,), borderRadius: BorderRadius.circular(15),),
        Positioned(bottom: 10, left: 0, child: Container(padding: EdgeInsets.all(10), child: Row(children: <Widget>[Text(name, style: TextStyle(color: Colors.white, fontSize: 30),), Text(age.toString(), style: TextStyle(color: Colors.white70, fontSize: 25),)])))
      ],),
      callback: (result, card){
          print("User swiped " + result.toString() + " on " + card.toString());
      })
    ];
  }
  
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Color(0xEE363636),
        body: CardStack(
            cards: cards,
            height: MediaQuery.of(context).size.height * 0.9,
            width: MediaQuery.of(context).size.width,
          ),
        );
  }


Libraries

swipeable_tinder_card