toJson method

Map<String, dynamic> toJson()

Handles creation of JSON (Map) objects from a network request state

Implementation

Map<String, dynamic> toJson() {
  return {
    'status': status.index,
    'value': value,
    'errorMessage': errorMessage,
  };
}