toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  Map<String, dynamic> filteredMap = {
    "enabled": enabled,
    "minimumLength": _minLength,
    "maximumLength": _maxLength,
    "dpmMode": dpmMode
  };

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

  return filteredMap;
}