Heloo everybody. I want to ask you, how i can delete my ListView item,and send this to the Provider.of<Members>(context)
I used to try many variants of changing. But in some case i get 'a dismissed dismissible widget is still part of the tree' error. In another after restate my ListView stay without change. I understan that problem is Provide to 'void removeMember' member id.
GitHub url https://github.com/Rodion98/wor_app.git
CodePudding user response:
your delete item logic is wrong, just try this
void removeMember(String memberId) {
_items.remove(_items.firstWhere((element) => element.idl == memberId));
notifyListeners();
}