DocumentMask.fromJson constructor

DocumentMask.fromJson(
  1. Object? j
)

Implementation

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