-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add animation when deleting an item from a list #1411
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,7 +195,17 @@ class _ProductListPageState extends State<ProductListPage> { | |
); | ||
if (dismissible) { | ||
return Dismissible( | ||
background: Container(color: colorScheme.background), | ||
direction: DismissDirection.endToStart, | ||
background: Container( | ||
alignment: Alignment.centerRight, | ||
margin: const EdgeInsets.symmetric(vertical: 14), | ||
color: RED_COLOR, | ||
padding: const EdgeInsets.only(right: 30), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you switch to a dark theme you will see that the red color container looks bigger than the list tile , There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have added margin of 14 to bottom and top. |
||
child: const Icon( | ||
Icons.delete, | ||
color: Colors.white, | ||
), | ||
), | ||
key: Key(product.barcode!), | ||
onDismissed: (final DismissDirection direction) async { | ||
final bool removed = | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the end to start behavior intended here, i guess it will limit the swipe feature to just one side