LessonCancelledData
The data of the event lessonCancelled, triggered when the user ends the lesson prematurely.
Note: that this does not automatically mean the user has failed the lesson; substantial lesson progress can still contribute to a pass (indicated by passed: true).
import '../../gofa_lessons.dart';
class LessonCancelledData extends EventData {
final String lessonId;
final Lesson? lesson;
final String playId;
final Play play;
final String? planId;
final Plan? plan;
final String? planPlayId;
final PlanPlay? planPlay;
LessonCancelledData({
required String? clientUserId,
required this.lessonId,
required this.lesson,
required this.playId,
required this.play,
required this.planId,
required this.plan,
required this.planPlayId,
required this.planPlay,
}) : super(clientUserId: clientUserId);
// toJson method
@override
Map<String, dynamic> toJson() {
return {
'clientUserId': clientUserId,
'lessonId': lessonId,
'lesson': lesson?.toJson(),
'playId': playId,
'play': play.toJson(),
'planId': planId,
'plan': plan?.toJson(),
'planPlayId': planPlayId,
'planPlay': planPlay?.toJson(),
};
}
}