Skip to main content

PlanFinishedData

The data of the event planFinished, triggered when the user completes the last lesson in the plan, marking the end of the lesson plan.

import '../../gofa_lessons.dart';

class PlanFinishedData extends EventData {
final String planId;
final Plan? plan;
final String planPlayId;
final PlanPlay planPlay;

PlanFinishedData({
required String? clientUserId,
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,
'planId': planId,
'plan': plan?.toJson(),
'planPlayId': planPlayId,
'planPlay': planPlay.toJson(),
};
}
}