In this article we are going to learn how to create a dismissible widgets for a dismissing list items using Dart in Flutter.
First we are going to take widget ' Dismissible() ' which will help me to make them swipeable.
Refer the red boxes as shown in Fig.
Now we are declaring three parameters ie. key, child, onDismissed . ' key ' is used to uniquely identify each element and onDismissed is used to swipe the frontend cardview left or right.
Declare an void Function of Expense type (custom) and pass through the parameterized constructor to get the input from frontend.
After that where the code for frontend is defined make an empty Function to remove the element and simply call the function in the body Function.
This will ultimately get the job done .
Final Thoughts
I hope you find this article helpful and worth it. Feel free to share it with your developer friend.
Happy Coding 🙌
0 Comments