Skip to content

Commit

Permalink
feat: Add animation when deleting an item from a list (#1411)
Browse files Browse the repository at this point in the history
* Add animation when deleting an item from a list

* Update product_list_page.dart

Co-authored-by: IRFAN GujjAR <irfangujjar@IRFANs-Mac-mini.local>
Co-authored-by: VaiTon <eyadlorenzo@gmail.com>
  • Loading branch information
3 people authored Mar 31, 2022
1 parent fd58afc commit 72bfb99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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,
background: Container(
alignment: Alignment.centerRight,
margin: const EdgeInsets.symmetric(vertical: 14),
color: RED_COLOR,
padding: const EdgeInsets.only(right: 30),
child: const Icon(
Icons.delete,
color: Colors.white,
),
),
key: Key(product.barcode!),
onDismissed: (final DismissDirection direction) async {
final bool removed =
Expand Down

0 comments on commit 72bfb99

Please sign in to comment.