fromJson static method

IrSizing fromJson(
  1. Object? json
)

Implementation

static IrSizing fromJson(Object? json) => switch (json) {
  num v => IrSizing.fixed(v.toDouble()),
  'hug' => const IrSizing.hug(),
  'fill' => const IrSizing.fill(),
  _ => throw FormatException('Bad sizing: $json'),
};