SubtitleBloc constructor

SubtitleBloc({
  1. required FlutterBasePlayer videoPlayerController,
  2. required SubtitleRepository subtitleRepository,
  3. 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()));
}