HostFunctionResponse.fromJson constructor Null safety

HostFunctionResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory HostFunctionResponse.fromJson(Map<String, dynamic> json) {
  String type = json['type'];
  List<ParameterResponse>? parameters;
  if (json['parameters'] != null) {
    parameters = List<ParameterResponse>.from(json['parameters']
        .map((e) => e == null ? null : ParameterResponse.fromJson(e)));
  }
  return HostFunctionResponse(type, parameters);
}