borderSide static method

BorderSide? borderSide(
  1. DataSource source,
  2. List<Object> key
)

Returns a BorderSide from the specified map.

If the map is absent, returns null.

Otherwise (even if it has no keys), the BorderSide is created from the keys color (see color, defaults to black), width (a double, defaults to 1.0), and style (see enumValue for BorderStyle, defaults to BorderStyle.solid).

Implementation

static BorderSide? borderSide(DataSource source, List<Object> key) {
  if (!source.isMap(key)) {
    return null;
  }
  return BorderSide(
    color: color(source, [...key, 'color']) ?? const Color(0xFF000000),
    width: source.v<double>([...key, 'width']) ?? 1.0,
    style: enumValue<BorderStyle>(BorderStyle.values, source, [...key, 'style']) ?? BorderStyle.solid,
  );
}