You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
683 B

import 'package:hadi_hoda_flutter/features/level/domain/entity/level_entity.dart';
import 'package:hadi_hoda_flutter/features/question/data/model/question_model.dart';
import 'package:hadi_hoda_flutter/features/question/domain/entity/question_entity.dart';
class LevelModel extends LevelEntity {
LevelModel({
super.id,
super.order,
super.title,
super.questions,
});
factory LevelModel.fromJson(Map<String, dynamic> json) {
return LevelModel(
id: json['id'],
order: json['order'],
title: json['title'],
questions: json['questions']
?.map<QuestionEntity>((e) => QuestionModel.fromJson(e))
.toList(),
);
}
}