95 lines
3.1 KiB
Dart
95 lines
3.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:skywood/main/lib_file.dart';
|
|
import 'package:skywood/utils/tools/widgets/sky_common_widget.dart';
|
|
|
|
class PlayerBottomWidget extends StatefulWidget {
|
|
|
|
const PlayerBottomWidget({super.key});
|
|
|
|
@override
|
|
State<StatefulWidget> createState() {
|
|
return _PlayerBottomWidgetState();
|
|
}
|
|
}
|
|
|
|
class _PlayerBottomWidgetState extends State<PlayerBottomWidget> {
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: double.infinity,
|
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
children: [
|
|
HelpImg.asset(ConstImg.unlike, width: 40, height: 40),
|
|
const SizedBox(height: 24),
|
|
Container(
|
|
height: 36,
|
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(4),
|
|
color: Colors.white.withAlpha(30),
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
HelpImg.asset(ConstImg.playLt, width: 17, height: 17),
|
|
const SizedBox(width: 10),
|
|
SkyText(text: 'EP.1', fontSize: 13, color: Colors.white,),
|
|
SkyText(text: ' / EP.50', fontSize: 13, color: Colors.white.withAlpha(126)),
|
|
],
|
|
),
|
|
Icon(Icons.arrow_forward_ios, color: Colors.white, size: 13,),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 8),
|
|
_buildProgressBar(),
|
|
const SizedBox(height: 7),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
SkyText(text: '00:09', fontSize: 13, color: Colors.white),
|
|
SkyText(text: ' / 10:20', fontSize: 13, color: Colors.white.withAlpha(126)),
|
|
],
|
|
),
|
|
SkyText(text: 'x1.0', fontSize: 13, color: Colors.white),
|
|
],
|
|
),
|
|
const SizedBox(height: 20),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildProgressBar() {
|
|
return SizedBox(
|
|
width: double.infinity, height: 3,
|
|
child: SliderTheme(
|
|
data: SliderThemeData(
|
|
trackHeight: 3, // ✅ 进度条高度 3
|
|
thumbShape: const RoundSliderThumbShape(enabledThumbRadius: 1),
|
|
overlayShape: const RoundSliderOverlayShape(overlayRadius: 3),
|
|
activeTrackColor: Colors.white, // ✅ 已播放 = 白色
|
|
inactiveTrackColor: Colors.white.withAlpha(126), // ✅ 未播放 = 灰色
|
|
thumbColor: Colors.white,
|
|
overlayColor: Colors.white.withOpacity(0.3),
|
|
),
|
|
child: Slider(
|
|
padding: EdgeInsets.zero,
|
|
value: 0.5,
|
|
min: 0,
|
|
max: 1,
|
|
onChanged: (value) {
|
|
// _controller.seekTo(Duration(milliseconds: value.toInt()));
|
|
},
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |