Iam working with data table, and i want to add remove action on every data rows. I use this as my reference code: Screen Data Source I insert a remove button as the element of the last cell, and use _dessert.remove(desert)
to remove the row from the list. The row is already deleted, but the element stay in the table unless I refresh the page. Any solution for this?
If you can get BuildContext, you can use:
(context as Element).markNeedsBuild()
but it's not recommended!
Use setState. It will re-render the widgets.
setState(() { _myState = newValue; });
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.