moveToTop method
Move the element at index to top of the stack
Implementation
void moveToTop(int index) {
var item = _list.removeAt(_list.length - index -1);
_list.add(item);
}
Move the element at index to top of the stack
void moveToTop(int index) {
var item = _list.removeAt(_list.length - index -1);
_list.add(item);
}