Get immediate access to this and 4,000+ other videos and books.

Take your career further with a raywenderlich.com Pro subscription. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it’s simply the best investment you can make in your development career.

Delete Data from the ListView Pro

This video was last updated on Aug 30 2022

See how to delete an item from a ListView leveraging a Dismissible widget, that show an animation when the user swipes an item from the ListView.

Contributors

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a raywenderlich.com Professional subscription.

Now users can view, add and update activities: the last action we need to implement to complete our CRUD interaction with Firestore is deleting Activities.

Future deleteActivity(String activityId) async { 
    try { 
      await activities.doc(activityId).delete(); 
    } on Exception catch (e) { 
      print(e.toString()); 
    } 
  } 
return Dismissible( 
  onDismissed: (_) { 
    helper.deleteActivity(activity.id); 
  }, 
  key: Key(activity.id.toString()), 
  child: ListTile( 
 ...

Reviews

Comments