ContextValue.fromJson constructor

ContextValue.fromJson(
  1. Map json_
)

Implementation

ContextValue.fromJson(core.Map json_)
    : this(
        label: json_.containsKey('label')
            ? LocalizedString.fromJson(
                json_['label'] as core.Map<core.String, core.dynamic>)
            : null,
        severity: json_.containsKey('severity')
            ? json_['severity'] as core.String
            : null,
        unit: json_.containsKey('unit') ? json_['unit'] as core.String : null,
        value: json_.containsKey('value')
            ? (json_['value'] as core.num).toDouble()
            : null,
      );