WGShare.Mobile.Flutter/wgshare/lib/pages/userPage/user_page.dart

197 lines
7.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:wgshare/utils/my_text.dart';
import '../../utils/color_util.dart';
class UserPage extends StatefulWidget {
const UserPage({super.key});
@override
State<UserPage> createState() => UserPageState();
}
class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
appBar: AppBar(
surfaceTintColor: Colors.white,
elevation: 0,
toolbarHeight: 0,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
systemNavigationBarColor: Color(0xFF000000),
systemNavigationBarIconBrightness: Brightness.light,
statusBarIconBrightness: Brightness.dark,
statusBarBrightness: Brightness.light,
),
backgroundColor: Colors.white,
),
body: Container(
color: ColorUtil.Color_244_244_244,
child: Column(
children: [
Container(
width: double.infinity,
height: 44,
color: Colors.white,
alignment: Alignment.center,
child: Text(
'我的',
style: TextStyle(
fontSize: 16,
color: ColorUtil.Color_51_51_51,
fontWeight: FontWeight.w500
),
),
),
Container(
width: double.infinity,
child: Container(
width: double.infinity,
color: Colors.white,
margin: const EdgeInsets.only(top: 1),
padding: const EdgeInsets.only(bottom: 60),
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 20, bottom: 6),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage(
"https://ts4.cn.mm.bing.net/th?id=OIP-C.QDl_Z7HdQWX_XbVYgBLJLQAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2",
),
),
),
width: 132,
height: 132,
),
),
Container(
child: Text(
'晓晓',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: ColorUtil.Color_85_117_242
),
),
),
Container(
padding: const EdgeInsets.only(left: 16, right: 16),
margin: const EdgeInsets.only(top: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'名称',
style: TextStyle(
fontSize: 12,
color: ColorUtil.Color_134_134_134
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'晓晓',
style: TextStyle(
fontSize: 12,
color: ColorUtil.Color_51_51_51
),
),
const SizedBox(width: 12),
Image.asset(
'assets/images/user_right.png',
width: 10,
height: 10,
)
],
),
],
)
),
Container(
width: double.infinity,
height: 1,
color: ColorUtil.Color_230_230_230,
margin: const EdgeInsets.only(top: 12, left: 16, right: 16),
),
Container(
padding: const EdgeInsets.only(left: 16, right: 16),
margin: const EdgeInsets.only(top: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'登录密码',
style: TextStyle(
fontSize: 12,
color: ColorUtil.Color_134_134_134
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'********',
style: TextStyle(
fontSize: 12,
color: ColorUtil.Color_51_51_51
),
),
const SizedBox(width: 12),
Image.asset(
'assets/images/user_right.png',
width: 10,
height: 10,
)
],
),
],
)
),
Container(
width: double.infinity,
height: 1,
color: ColorUtil.Color_230_230_230,
margin: const EdgeInsets.only(top: 12, left: 16, right: 16),
),
],
),
),
),
Container(
width: 280,
height: 44,
margin: const EdgeInsets.only(top: 40),
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(99)),
color: ColorUtil.Color_85_117_242,
),
alignment: Alignment.center,
child: const Text(
'退出登录',
style: TextStyle(
fontSize: 16,
color: Colors.white,
),
),
)
],
),
)
);
}
}