StringList.fromJson constructor

StringList.fromJson(
  1. Object? j
)

Implementation

factory StringList.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return StringList(
    values: switch (json['values']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) decodeString(i)],
      _ => throw const FormatException('"values" is not a list'),
    },
  );
}