CustomMetadata.fromJson constructor

CustomMetadata.fromJson(
  1. Object? j
)

Implementation

factory CustomMetadata.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return CustomMetadata(
    stringValue: switch (json['stringValue']) {
      null => null,
      Object $1 => decodeString($1),
    },
    stringListValue: switch (json['stringListValue']) {
      null => null,
      Object $1 => StringList.fromJson($1),
    },
    numericValue: switch (json['numericValue']) {
      null => null,
      Object $1 => decodeDouble($1),
    },
    key: switch (json['key']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}