fromJson static method Null safety

TrigMode fromJson(
  1. Object? json
)

Implementation

static TrigMode fromJson(Object? json) {
  for (final m in const {deg, rad, grad}) {
    if (json == m.label) {
      return m;
    }
  }
  assert(false);
  return deg;
}