bool removeItem(int index) { if (index < 0 || index >= items.length) { return false; } items.removeAt(index); return true; }