video_opera_widget.dart 3.17 KB
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),
                      ),
                    ),
                  )
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}