toJson method

Map<String, dynamic> toJson()

Allows you to serialize object.

Implementation

Map<String, dynamic> toJson() => {
      "threshold": threshold,
      "overThreshold": overThreshold.value,
      "over18": over18.value,
      "over21": over21.value,
      "over25": over25.value,
      "over65": over65.value,
    }.clearNulls();