swipeable_tinder_card

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

swipeable tinder card

swipeable_tinder_card #
A card stack that can be swiped left and right
Usage #
dependencies:
swipeable_tinder_card: 1.0.0
copied to clipboard
#Install It
You can install packages from the command line:
with flutter:
$ flutter pub get
copied to clipboard
#Import it
import 'package:swipeable_tinder_card/swipeable_tinder_card.dart';
copied to clipboard
#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,
),
);
}


copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.