Prompt.fromJson constructor
Implementation
factory Prompt.fromJson(Map<String, dynamic> json) {
return Prompt(
maxAttempts: json['maxAttempts'] as int,
messages: (json['messages'] as List)
.whereNotNull()
.map((e) => Message.fromJson(e as Map<String, dynamic>))
.toList(),
responseCard: json['responseCard'] as String?,
);
}