If you want to remove item from list by swiping left, use Dismissible() widget. This widget requires key and onDimissed function. In this function, you need to pass function that remove item from array list, and also you need key, which has to be set using ValueKey(value).
If you want to show the snack back on the bottom of screen whenever the item is removed, you need to use ScaffoldMessenger.of(context).showSnackBar() and you need to add SnackBar() with duration, ocntent, action. This action includes SnackBarAction(label: 'Undo, onPressed() with set state)
The DropdownButton comes with DropdownMenuItem. This widget needs to be included value and child, in addition, this dropdownbutton has attribute, items, array list, so we can pass map function values but it's required to be added with toList() method.
dispose like initState and build is part of a stateful widget's lifecycle. It's called automatically by Flutter when the widget & its state are about to be destroyed.
dispose method used to release the memory allocated to variables when state object is removed.