119ba920
liangchengyou
feat:视频播放器
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:wow_english/video/lookvideo/bloc/look_video_bloc.dart';
import 'package:wow_english/video/lookvideo/widgets/video_widget.dart';
class LookVideoPage extends StatelessWidget {
const LookVideoPage({super.key});
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => LookVideoBloc(),
child: _LookVideoPage(),
);
}
}
class _LookVideoPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocListener<LookVideoBloc, LookVideoState>(
listener: (context,state){},
child: _lookVideoView(),
);
}
Widget _lookVideoView() => BlocBuilder<LookVideoBloc, LookVideoState>(
builder: (context,state){
return const VideoWidget(
videoUrl: 'https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/7194236f31b2e1e3da0fe06cfed4ba2b.mp4',
);
});
}
|