radius static method

Map<String, double>? radius(
  1. Radius? radius
)

Returns a Radius from the specified map.

The map must have an x value corresponding to Radius.x, and may have a y value corresponding to Radius.y.

If the map only has an x key, the y value is assumed to be the same (as in Radius.circular).

If the x key is absent, the returned value is null.

Implementation

static Map<String, double>? radius(Radius? radius) {
  if (radius == null) return null;
  return {
    'x': radius.x,
    'y': radius.y,
  };
}