123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- import 'package:flutter/material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:fluttertoast/fluttertoast.dart';
- import 'package:get/get.dart';
-
- class UserInfo extends StatefulWidget {
- const UserInfo({Key? key}) : super(key: key);
-
- @override
- _UserInfo createState() => _UserInfo();
- }
-
- class _UserInfo extends State<UserInfo> {
- String name = '';
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- elevation: 0,
- centerTitle: true,
- backgroundColor: Colors.white,
- title: Text(
- '个人信息',
- style: TextStyle(
- color: Colors.black,
- fontSize: 17.sp,
- letterSpacing: 2,
- fontWeight: FontWeight.bold),
- ),
- ),
- body: Container(
- color: Color(0xFFffffff),
- padding: EdgeInsets.all(15.w),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Container(
- margin: EdgeInsets.fromLTRB(0, 0, 0, 40.h),
- padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 0),
- decoration: BoxDecoration(
- color: const Color(0xFFFFFFFF),
- boxShadow: [
- BoxShadow(
- color: const Color(0x1F000000),
- offset: Offset(0, 1.w),
- blurRadius: 0,
- ),
- ],
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Image.asset(
- 'images/userMoren.png',
- width: 62.w,
- height: 62.w,
- ),
- Text(
- '更换头像',
- style: TextStyle(
- fontSize: 17.sp,
- color: Color(0xFF333333),
- letterSpacing: 2,
- fontWeight: FontWeight.w500),
- ),
- ]),
- ),
- Text(
- '姓名:',
- style: TextStyle(
- color: const Color(0xFF333333),
- fontSize: 17.sp,
- letterSpacing: 2,
- fontWeight: FontWeight.bold),
- ),
- Container(
- margin: EdgeInsets.fromLTRB(0, 20.h, 0, 40.h),
- padding: EdgeInsets.symmetric(vertical: 19.h, horizontal: 0),
- decoration: BoxDecoration(
- color: const Color(0xFFFFFFFF),
- boxShadow: [
- BoxShadow(
- color: const Color(0x1F000000),
- offset: Offset(0, 1.w),
- blurRadius: 0,
- ),
- ],
- ),
- child: Column(
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Container(
- width: 200.w,
- child: TextFormField(
- initialValue: name,
- style: TextStyle(
- color: Color(0xFF333333),
- fontSize: 17.sp,
- letterSpacing: 2,
- fontWeight: FontWeight.bold),
- decoration: const InputDecoration(
- isCollapsed: true,
- hintText: '请输入您的姓名',
- border: InputBorder.none,
- counterText: '', //去掉计数
- floatingLabelBehavior:
- FloatingLabelBehavior.never,
- ),
- onChanged: (e) {},
- ),
- ),
- Image.asset(
- 'images/icons/cancel.png',
- width: 18.w,
- height: 18.w,
- )
- ]),
- ],
- )),
- ],
- ),
- ),
- );
- }
- }
|