feat: 播放处理,个人中心,
This commit is contained in:
1 parent
e59ac2177b
commit
4ccea08472
37 files changed
+1425
-115
No files matched your search
@@ -0,0 +1,93 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:skywood/main/lib_file.dart';
|
||||
import 'package:skywood/utils/tools/widgets/sky_common_widget.dart';
|
||||
|
||||
class MineSectionView extends StatelessWidget {
|
||||
|
||||
const MineSectionView({
|
||||
super.key,
|
||||
this.width,
|
||||
this.height,
|
||||
required this.title,
|
||||
required this.imgName,
|
||||
this.type = 1, // 1,2
|
||||
this.paddingSpace = 5,
|
||||
this.child
|
||||
});
|
||||
|
||||
final String title;
|
||||
final double? width;
|
||||
final double? height;
|
||||
final String imgName;
|
||||
final int type;
|
||||
final double paddingSpace;
|
||||
final Widget? child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(
|
||||
children: [
|
||||
HelpImg.asset(imgName, width: width, height: height, fit: BoxFit.fill),
|
||||
Positioned(
|
||||
left: paddingSpace, right: paddingSpace, top: 8,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildHeader(),
|
||||
const SizedBox(height: 10),
|
||||
child ?? SizedBox()
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildHeader() {
|
||||
return Stack(
|
||||
children: [
|
||||
HelpImg.asset(ConstImg.sectionTopBg, width: width, height: 20.h),
|
||||
Positioned(
|
||||
left: 7, right: 7,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
HelpImg.asset(ConstImg.littleLeft, width: 7),
|
||||
const SizedBox(width: 2),
|
||||
SkyText(text: title, fontSize: 12, color: Colors.white)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: List.generate(3, (i) {
|
||||
return HelpImg.asset(ConstImg.littleRight, width: 5);
|
||||
}),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class mImgBg extends StatelessWidget {
|
||||
const mImgBg({super.key,
|
||||
this.width,
|
||||
this.height,
|
||||
this.fit = BoxFit.fill,
|
||||
required this.imgName,
|
||||
});
|
||||
|
||||
final double? width;
|
||||
final double? height;
|
||||
final String imgName;
|
||||
final BoxFit fit;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return HelpImg.asset(imgName, width: width, height: height, fit: fit);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user