toJson method

Map<String, dynamic> toJson()

Converts the object back to JSON map.

Implementation

Map<String, dynamic> toJson() => {
  'name': name?.value,
  'threshold': threshold,
};