FormAnswer.fromJson constructor

FormAnswer.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory FormAnswer.fromJson(Map<String, Object?> json) {
  return FormAnswer(
    adf: json[r'adf'] != null
        ? JsonNode.fromJson(json[r'adf']! as Map<String, Object?>)
        : null,
    choices: (json[r'choices'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    date: json[r'date'] as String?,
    text: json[r'text'] as String?,
    time: json[r'time'] as String?,
    users: (json[r'users'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
  );
}