toMap method

  1. @override
Map<String, dynamic> toMap()
override

Implementation

@override
Map<String, dynamic> toMap() {
  var map = {'id': id.join(',')};
  if (type.isNotEmpty) {
    map.putIfAbsent('type', () => type.map((e) => e.name()).join(','));
  }
  if (versions) {
    map.putIfAbsent('versions', () => '1');
  }
  if (videos) {
    map.putIfAbsent('videos', () => '1');
  }
  if (stats) {
    map.putIfAbsent('stats', () => '1');
  }
  if (historical) {
    map.putIfAbsent('historical', () => '1');
  }
  if (marketplace) {
    map.putIfAbsent('marketplace', () => '1');
  }
  if (comments) {
    map.putIfAbsent('comments', () => '1');
  }
  if (ratingComments) {
    map.putIfAbsent('ratingcomments', () => '1');
  }
  return map;
}