create static method

SocketConnection create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "socketConnection",
  3. String? status,
})
override

return original data json

Implementation

static SocketConnection create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "socketConnection",
  String? status,
}) {
  // SocketConnection socketConnection = SocketConnection({
  final Map socketConnection_data_create_json = {
    "@type": special_type,
    "status": status,
  };

  socketConnection_data_create_json
      .removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (socketConnection_data_create_json.containsKey(key) == false) {
        socketConnection_data_create_json[key] = value;
      }
    });
  }
  return SocketConnection(socketConnection_data_create_json);
}