serialize method
Serializes all of its items into a single map, separted by their id.
Implementation
Map<String, dynamic> serialize() {
final serializedItem = <String, dynamic>{};
for (final element in _items as List<ItemSerializable>) {
serializedItem[element.id] = element.serialize();
}
return serializedItem;
}