toMap method
Implementation
Map<String, dynamic> toMap() {
Map<String, dynamic> filteredMap = {
"enabled": enabled,
"minimumLength": _minLength,
"maximumLength": _maxLength
};
filteredMap.removeWhere((key, value) => value == null);
return filteredMap;
}