getWithFallback static method

ConnectionStyle getWithFallback(
  1. String? id
)

Get a connection style with fallback to default

If the requested style is not found, returns the default style (smoothstep).

Implementation

static ConnectionStyle getWithFallback(String? id) {
  if (id == null) return smoothstep;
  return byId[id] ?? smoothstep;
}