toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return <String, dynamic>{
    'value': value,
    if (unit != null) 'unit': unit?.toStringValue(),
  };
}