Converts instance to a map.
Map<String, dynamic> toMap() { return { "menuItems": menuItems.map((e) => e.toMap()).toList(), "settings": settings?.toMap(), ..._toMapMergeWith(), }; }