SubtitleBloc constructor
SubtitleBloc({
- required FlutterBasePlayer videoPlayerController,
- required SubtitleRepository subtitleRepository,
- required SubtitleController subtitleController,
Implementation
SubtitleBloc({
required this.videoPlayerController,
required this.subtitleRepository,
required this.subtitleController,
}) : super(SubtitleInitial()) {
subtitleController.attach(this);
on<LoadSubtitle>((event, emit) => loadSubtitle(emit: emit));
on<InitSubtitles>((event, emit) => initSubtitles(emit: emit));
on<UpdateLoadedSubtitle>(
(event, emit) => emit(LoadedSubtitle(event.subtitle)),
);
on<CompletedShowingSubtitles>((event, emit) => emit(CompletedSubtitle()));
}