toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  Map<String, dynamic> filteredMap = {"enabled": enabled};

  filteredMap.removeWhere((key, value) => value == null);

  return filteredMap;
}