SafetySpec.fromJson constructor

SafetySpec.fromJson(
  1. Object? j
)

Implementation

factory SafetySpec.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return SafetySpec(
    version: switch (json['version']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
  );
}