Blame view

lib/video/lookvideo/widgets/video_opera_widget.dart 3.17 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
  import 'package:flutter/material.dart';
  import 'package:flutter_screenutil/flutter_screenutil.dart';
  import 'package:wow_english/common/extension/string_extension.dart';
  
  class VideoOperaWidget extends StatefulWidget {
    const VideoOperaWidget({super.key,  this.currentTime = '00:00', this.totalTime = '00:00', this.degree = 0.0,});
    //当前播放时间
    final String currentTime;
    //总时间
    final String totalTime;
    final double degree;
  
    @override
    State<StatefulWidget> createState() {
      return _VideoOperaWidgetState();
    }
  }
  
  class _VideoOperaWidgetState extends State<VideoOperaWidget> {
    @override
    Widget build(BuildContext context) {
      return SafeArea(
        child: SizedBox(
          width: double.infinity,
          height: double.infinity,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Padding(
                padding: EdgeInsets.only(left: 8.5.w,right: 8.5.w,top: 11.h),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Row(
                      children: [
                        Image.asset(
                          'back_around'.assetPng,
                          height: 40,
                          width: 40
                        ),
                        18.horizontalSpace,
                        Container(
                          height: 40.h,
                          alignment: Alignment.center,
                          decoration: BoxDecoration(
                              color: Colors.white,
                              borderRadius: BorderRadius.circular(6.r),
                              border: Border.all(
                                  width: 1.5,
                                  color: const Color(0xFF140C10)
                              )
                          ),
                          padding: EdgeInsets.symmetric(horizontal: 10.w),
                          child: Text(
                            'song',
                            textAlign: TextAlign.center,
                            style: TextStyle(
                              fontSize: 20.sp,
                              color: const Color(0xFF333333),
                            ),
                          ),
                        )
                      ],
                    ),
                    Container(
                      height: 40.h,
                      alignment: Alignment.center,
                      decoration: BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.circular(6.r),
                          border: Border.all(
                              width: 1.5,
                              color: const Color(0xFF140C10)
                          )
                      ),
                      padding: EdgeInsets.symmetric(horizontal: 10.w),
                      child: Text(
                        '中/英',
                        style: TextStyle(
                          fontSize: 20.sp,
                          color: const Color(0xFF333333),
                        ),
                      ),
                    )
                  ],
                ),
              )
            ],
          ),
        ),
      );
    }
  }