fromJson static method

ServerConnection? fromJson(
  1. Object? json
)

Implementation

static ServerConnection? fromJson(Object? json) {
  if (json is! Map) return null;
  var kind = json['kind'];
  var dsn = json['dsn'];
  if (kind is! String || dsn is! String) return null;
  return ServerConnection(kind, dsn, label: _string(json['label']));
}