CometInput.fromJson constructor

CometInput.fromJson(
  1. Object? j
)

Implementation

factory CometInput.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return CometInput(
    metricSpec: switch (json['metricSpec']) {
      null => null,
      Object $1 => CometSpec.fromJson($1),
    },
    instance: switch (json['instance']) {
      null => null,
      Object $1 => CometInstance.fromJson($1),
    },
  );
}