serialize method
Serializes all of its items into a single map.
Implementation
Map<String, dynamic> serialize() {
final serializedItem = <String, dynamic>{};
_items.forEach((key, element) {
serializedItem[key] = (element as ItemSerializable).serialize();
});
return serializedItem;
}