IdMatcher.fromJson constructor

IdMatcher.fromJson(
  1. Object? j
)

Implementation

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