24 lines
676 B
Dart
24 lines
676 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncfusion_flutter_calendar/calendar.dart';
|
|
|
|
import '../../../../state/app/modules/timetable/bloc/timetable_state.dart';
|
|
import '../data/arbitrary_appointment.dart';
|
|
import 'custom_event_sheet.dart';
|
|
import 'lesson_sheet.dart';
|
|
|
|
class AppointmentDetailsDispatcher {
|
|
static void show(
|
|
BuildContext context,
|
|
TimetableState? state,
|
|
Appointment appointment,
|
|
) {
|
|
final id = appointment.id;
|
|
if (id is! ArbitraryAppointment) return;
|
|
|
|
id.when(
|
|
lesson: (entry) => LessonSheet.show(context, state, appointment, entry),
|
|
custom: (event) => CustomEventSheet.show(context, event),
|
|
);
|
|
}
|
|
}
|