修复版本管理整包更新无法弹出的问题

完成集成新的登录接口的更换使用
完成集成用户的场站列表接口
完成开发设计选择场站项为全局属性
完成我的页面的个人信息的集成和详情页面的开发
完成设备页面的中无人机机场的列表接口对接入和个项页面的布局的优化
完成设备页面的中无人机机场的详情接口的对接和使用和页面的更新布局
This commit is contained in:
2026-05-29 14:13:34 +08:00
parent 938aac2db9
commit 335c468aac
23 changed files with 1294 additions and 705 deletions

View File

@@ -7,92 +7,110 @@ class UserProfileCard extends StatelessWidget {
super.key,
required this.name,
required this.role,
this.avatar,
this.onTap,
});
final String name;
final String role;
final String? avatar;
final VoidCallback? onTap;
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: const EdgeInsets.fromLTRB(20, 70, 20, 50),
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF165DFF),
Color(0xFF0E42CC),
return InkWell(
onTap: onTap,
child: Container(
width: double.infinity,
padding: const EdgeInsets.fromLTRB(20, 70, 20, 50),
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF165DFF),
Color(0xFF0E42CC),
],
),
),
child: Row(
children: [
// 头像
Container(
width: 56,
height: 56,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Colors.white,
width: 2,
),
),
child: ClipOval(
child: _buildAvatar(),
),
),
const SizedBox(width: 14),
// 用户信息
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.white,
letterSpacing: 0.5,
),
),
const SizedBox(height: 6),
Text(
role,
style: TextStyle(
fontSize: 13,
color: Colors.white.withOpacity(0.85),
letterSpacing: 0.3,
),
),
],
),
),
// 箭头
Icon(
Icons.chevron_right,
color: Colors.white.withOpacity(0.9),
size: 24,
),
],
),
),
child: Row(
children: [
// 头像
Container(
width: 56,
height: 56,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Colors.white,
width: 2,
),
),
child: ClipOval(
child: Image.asset(
'assets/images/app_logo.png',
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return Container(
color: Colors.white,
child: Icon(
Icons.person,
size: 32,
color: const Color(0xFF165DFF),
),
);
},
),
),
),
const SizedBox(width: 14),
// 用户信息
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.white,
letterSpacing: 0.5,
),
),
const SizedBox(height: 6),
Text(
role,
style: TextStyle(
fontSize: 13,
color: Colors.white.withOpacity(0.85),
letterSpacing: 0.3,
),
),
],
),
),
// 箭头
Icon(
Icons.chevron_right,
color: Colors.white.withOpacity(0.9),
size: 24,
),
],
);
}
Widget _buildAvatar() {
// 如果有头像 URL,显示网络图片
if (avatar != null && avatar!.isNotEmpty) {
return Image.network(
avatar!,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return _buildDefaultAvatar();
},
);
}
// 否则显示默认头像
return _buildDefaultAvatar();
}
Widget _buildDefaultAvatar() {
return Container(
color: Colors.white,
child: Icon(
Icons.person,
size: 32,
color: const Color(0xFF165DFF),
),
);
}