-
-
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
Conversation
Animation for delete list item |
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.
Heyy @IRFAN-GujjAR, looks good. Just one small comment
@@ -195,7 +195,17 @@ class _ProductListPageState extends State<ProductListPage> { | |||
); | |||
if (dismissible) { | |||
return Dismissible( | |||
background: Container(color: colorScheme.background), | |||
//Delete Animation Added |
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.
We don't need this comment here
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.
//Delete Animation Added |
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.
just some UI suggestions from my side
@@ -195,7 +195,17 @@ class _ProductListPageState extends State<ProductListPage> { | |||
); | |||
if (dismissible) { | |||
return Dismissible( | |||
background: Container(color: colorScheme.background), | |||
//Delete Animation Added | |||
direction: DismissDirection.endToStart, |
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
direction: DismissDirection.endToStart, | ||
background: Container( | ||
alignment: Alignment.centerRight, | ||
padding: const EdgeInsets.only(right: 30), |
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.
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
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.
I have added margin of 14 to bottom and top.
background: Container( | ||
alignment: Alignment.centerRight, | ||
padding: const EdgeInsets.only(right: 30), | ||
color: Colors.red, |
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.
We have our own color scheme in design_constants.dart it would be good if you could switch to that color
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.
I have now changed Colors.red to RED_COLOR from design_constants.dart
Now its ready to be merged |
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.
Looks good, thanks @IRFAN-GujjAR
Welcome @M123-dev |
Video
video.mp4
Issue Resolved: