fromJson static method

IrCorners fromJson(
  1. Object? json
)

Implementation

static IrCorners fromJson(Object? json) => switch (json) {
  null => zero,
  num r => IrCorners.all(r.toDouble()),
  Map<String, Object?> m => IrCorners(
    topLeft: _d(m['topLeft']) ?? 0,
    topRight: _d(m['topRight']) ?? 0,
    bottomRight: _d(m['bottomRight']) ?? 0,
    bottomLeft: _d(m['bottomLeft']) ?? 0,
  ),
  _ => throw FormatException('Bad corners: $json'),
};