toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      if (type != null) 'type': type,
      if (reason != null) 'reason': reason,
      if (error != null) 'error': error!.toJson(),
    };