首页小e动画

This commit is contained in:
czz
2025-06-07 17:49:19 +08:00
parent 77152e5d81
commit 48b3b06f17
3 changed files with 331 additions and 60 deletions

View File

@@ -9,7 +9,7 @@ import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/controller/device/body_device_controller.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/mh_controller/muser_info_controller.dart';
import 'package:vbvs_app/pages/mh_page/FloatingSvgIcon.dart';
class NewHomePage extends StatefulWidget {
const NewHomePage({super.key});
@@ -96,64 +96,64 @@ class _NewHomePageState extends State<NewHomePage> {
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
titleSpacing: 0,
title: Row(
children: [
// 左侧头像
SizedBox(width: 40.rpx),
CircleAvatar(
radius: 27.rpx, // 可根据需求调整
backgroundImage: login == 1
? (userInfoController.model.user!.avatar == null ||
userInfoController.model.user!.avatar!.isEmpty
? const AssetImage(
iconTheme:
IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
titleSpacing: 0,
title: Container(
height: 180.rpx,
child: Row(
children: [
// 左侧头像
SizedBox(width: 40.rpx),
CircleAvatar(
radius: 27.rpx, // 可根据需求调整
backgroundImage: login == 1
? (userInfoController.model.user!.avatar == null ||
userInfoController
.model.user!.avatar!.isEmpty
? const AssetImage(
"assets/images/people_avatar.png",
)
: NetworkImage(
userInfoController.model.user!.avatar!,
))
: const AssetImage(
"assets/images/people_avatar.png",
)
: NetworkImage(
userInfoController.model.user!.avatar!,
))
: const AssetImage(
"assets/images/people_avatar.png",
),
),
SizedBox(width: 23.rpx), // 左侧头像和文本之间的间距
Text(
'Eason Chan',
style: TextStyle(fontSize: 30.rpx, color: Colors.white),
),
),
),
SizedBox(width: 23.rpx), // 左侧头像和文本之间的间距
Text(
'Eason Chan',
style: TextStyle(fontSize: 30.rpx, color: Colors.white),
),
const Spacer(), // 左右分隔
// Container(
// width: 61.rpx,
// height: 78.rpx,
// alignment: const Alignment(0, 0),
// child: Image.asset(
// "assets/images/xiaoe.png",
// fit: BoxFit.cover,
// ),
// ),
// SizedBox(width: 46.rpx), // icon 之间的间距
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.transparent,
padding: EdgeInsets.only(right: 0),
onTap: () {},
child: Container(
height: 60.rpx,
width: 75.rpx,
child: SvgPicture.asset(
'assets/img/icon/xiaoe.svg',
// color: Colors.white,
))),
const Spacer(), // 左右分隔
// Container(
// width: 61.rpx,
// height: 78.rpx,
// alignment: const Alignment(0, 0),
// child: Image.asset(
// "assets/images/xiaoe.png",
// fit: BoxFit.cover,
// ),
// ),
// SizedBox(width: 46.rpx), // icon 之间的间距
// SizedBox(width: 40.rpx),
],
),
centerTitle: false,
),
FloatingSvgIcon(
assetPath: 'assets/img/icon/xiaoe.svg',
width: 60.rpx,
height: 60.rpx,
onTap: () {
print("点击了小鹅图标");
},
),
SizedBox(width: 40.rpx),
],
),
)),
body: SafeArea(
child: Container(
width: MediaQuery.sizeOf(context).width,
@@ -165,9 +165,7 @@ class _NewHomePageState extends State<NewHomePage> {
// fit: BoxFit.cover,
// ),
// ),
decoration: BoxDecoration(
),
decoration: BoxDecoration(),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,