fromJson static method

EdgeInsets fromJson(
  1. Object? json
)

Implementation

static EdgeInsets fromJson(Object? json) {
  if (readDouble(json) case final double v) return EdgeInsets.all(v);
  final l = readList(json);
  if (l == null || l.length != 4) return zero;
  return EdgeInsets.fromLTRB(readDouble(l[0]) ?? 0, readDouble(l[1]) ?? 0, readDouble(l[2]) ?? 0, readDouble(l[3]) ?? 0);
}