toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final onFailure = this.onFailure;
  final onSuccess = this.onSuccess;
  return {
    if (onFailure != null) 'OnFailure': onFailure,
    if (onSuccess != null) 'OnSuccess': onSuccess,
  };
}