Aidra Driver
1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
qcm_model.dart
Go to the documentation of this file.
1
import
'../../domain/entities/qcm_entity.dart';
2
3
class
QcmModel
extends
QcmEntity
{
4
const
QcmModel
({
5
super.id,
6
super.courseId,
7
super.question,
8
super.options,
9
super.correctAnswerIndex,
10
super.explanation,
11
});
12
13
factory
QcmModel
.fromJson(Map<String, dynamic> json) {
14
return
QcmModel
(
15
id
: json[
'id'
],
16
courseId
: json[
'courseId'
],
17
question: json[
'question'
],
18
options: json[
'options'
] != null
19
? List<String>.from(json[
'options'
])
20
: null,
21
correctAnswerIndex: json[
'correctAnswerIndex'
],
22
explanation: json[
'explanation'
],
23
);
24
}
25
26
Map<String, dynamic>
toJson
() {
27
return
{
28
'id'
:
id
,
29
'courseId'
:
courseId
,
30
'question'
: question,
31
'options'
: options,
32
'correctAnswerIndex'
: correctAnswerIndex,
33
'explanation'
: explanation,
34
};
35
}
36
}
QcmEntity
Definition
qcm_model.dart:3
QcmEntity::toJson
Map< String, dynamic > toJson()
Definition
qcm_model.dart:26
QcmEntity::QcmModel
const QcmModel({ super.id, super.courseId, super.question, super.options, super.correctAnswerIndex, super.explanation, })
id
final int id
Definition
collection_voucher_document_model.dart:42
courseId
class GetPdfPathUseCase implements UseCase< String, PdfParams > courseId
lib
features
e-learning
data
models
qcm_model.dart
Generated by
1.16.1