create static method
SocketError
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "socketError",
- String? message,
- String? description,
- String? error,
override
return original data json
Implementation
static SocketError create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "socketError",
String? message,
String? description,
String? error,
}) {
// SocketError socketError = SocketError({
final Map socketError_data_create_json = {
"@type": special_type,
"message": message,
"description": description,
"error": error,
};
socketError_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (socketError_data_create_json.containsKey(key) == false) {
socketError_data_create_json[key] = value;
}
});
}
return SocketError(socketError_data_create_json);
}