codetoart / cta-flutter-tinder-card-animation Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
I wanted to add a stacked swipeable card widget to my project, but this widget isn't working.
It seems i cannot set the card width or heigth, but i need to set the cardWidthTopMul (i can imagine what it is) but it destroys the sensibility while dragging.
I am using this on a web application, is this a bug?
Widget bodyLayout() { return Center( child: Column( children: [ SwipeableCardsSection( cardWidthTopMul: 0.2, items: _newCards, context: context, enableSwipeDown: false, enableSwipeUp: false, ), ], ), ); }
Consider this simple page: a counter, a button that increments the counter, and two Text
widgets displaying the count: one inside SwipeableCardsSection
, one outside.
import 'package:flutter/material.dart';
import 'package:swipe/card_view.dart';
import 'package:swipeable_card_stack/swipeable_card_stack.dart';
void main() {
runApp(const MaterialApp(
home: MyHomePage(),
));
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int counter = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
ElevatedButton(
child: const Text('Increment'),
onPressed: () => setState(() {
counter++;
}),
),
Text("Counter (outside swipeable): $counter"),
SwipeableCardsSection(
cardController: SwipeableCardSectionController(),
context: context,
items: [
Text("Counter (inside swipeable): $counter"),
],
enableSwipeUp: true,
enableSwipeDown: true,
),
],
),
);
}
}
Expected behavior: both text widgets show the count.
Actual behavior: the widget outside SwipeableCardsSection
updates, the inside widget doesn't.
Hello! Beautiful project, it works brilliantly! Is there currently an idiomatic way to "cancel" the swipe? i.e. the user swipes up, the card returns to its position on the top of the stack, and other action happens.
Thank you!
even if i asssing the list of cards with length more than three it does not show more than 3 cards weird behaviour .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.