toMap method

dynamic toMap()

Implementation

dynamic toMap() {
  final Map<String, dynamic> json = <String, dynamic>{};

  void addIfPresent(String fieldName, dynamic value) {
    if (value != null) {
      json[fieldName] = value;
    }
  }

  addIfPresent('hasContains', hasContains);
  addIfPresent('hasShow', hasShow);
  addIfPresent('hasAgree', hasAgree);
  return json;
}