119ba920
liangchengyou
feat:视频播放器
|
1
2
3
|
import 'package:flutter/cupertino.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:video_player/video_player.dart';
|
46675a89
吴启风
feat:过渡页-视频环节
|
4
5
6
|
import 'package:wow_english/pages/section/subsection/base_section/bloc.dart';
import 'package:wow_english/pages/section/subsection/base_section/event.dart';
import 'package:wow_english/pages/section/subsection/base_section/state.dart';
|
119ba920
liangchengyou
feat:视频播放器
|
7
8
9
10
|
part 'look_video_event.dart';
part 'look_video_state.dart';
|
aa0d2360
吴启风
feat:过渡页-视频环节(再来一次)
|
11
|
class LookVideoBloc extends BaseSectionBloc<BaseSectionEvent, BaseSectionState> {
|
119ba920
liangchengyou
feat:视频播放器
|
12
13
14
|
VideoPlayerController? _controller;
|
46675a89
吴启风
feat:过渡页-视频环节
|
15
16
17
18
19
20
21
22
23
24
|
final String? _videoUrl;
String? get videoUrl => _videoUrl;
final String? _typeTitle;
String? get typeTitle => _typeTitle;
final String? _courseLessonId;
String? get courseLessonId => _courseLessonId;
final bool _isTopic;
bool get isTopic => _isTopic;
LookVideoBloc(this._videoUrl, this._typeTitle, this._courseLessonId, this._isTopic) : super(LookVideoInitial()) {
|
119ba920
liangchengyou
feat:视频播放器
|
25
26
27
|
on<LookVideoEvent>((event, emit) {
// TODO: implement event handler
});
|
aa0d2360
吴启风
feat:过渡页-视频环节(再来一次)
|
28
29
30
|
on<SectionAgainEvent>((event, emit) {
emit(SectionAgainState());
});
|
119ba920
liangchengyou
feat:视频播放器
|
31
32
|
}
}
|