Skip to content
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

Merged
merged 4 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/smooth_app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: e1ffd3daa5042cd516081f94f61b857c0deb822d

COCOAPODS: 1.11.3
COCOAPODS: 1.11.2
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,17 @@ class _ProductListPageState extends State<ProductListPage> {
);
if (dismissible) {
return Dismissible(
background: Container(color: colorScheme.background),
direction: DismissDirection.endToStart,
Copy link
Member

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

background: Container(
alignment: Alignment.centerRight,
margin: const EdgeInsets.symmetric(vertical: 14),
color: RED_COLOR,
padding: const EdgeInsets.only(right: 30),
Copy link
Member

Choose a reason for hiding this comment

The 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 ,
maybe a margin around the container fix that, you can try the suggested changes

Copy link
Author

Choose a reason for hiding this comment

The 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 =
Expand Down