@override Map<String, Object?> toMap() { final data = <String, Object?>{ 'index': index, 'itemsCount': itemsCount, }; data.removeWhere((key, value) => value == null); return data; }