From e56e66d585848199b281fec005cbb4fd5418cc21 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Sat, 20 Feb 2021 14:25:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BF=AE=E6=94=B9=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/settings/nick_name_change_page.dart | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 lib/ui/settings/nick_name_change_page.dart diff --git a/lib/ui/settings/nick_name_change_page.dart b/lib/ui/settings/nick_name_change_page.dart new file mode 100644 index 0000000..afe38c1 --- /dev/null +++ b/lib/ui/settings/nick_name_change_page.dart @@ -0,0 +1,80 @@ +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:velocity_x/velocity_x.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class NickNameChangePage extends StatefulWidget { + NickNameChangePage({Key key}) : super(key: key); + + @override + _NickNameChangePageState createState() => _NickNameChangePageState(); +} + +class _NickNameChangePageState extends State { + TextEditingController _textEditingController; + @override + void initState() { + super.initState(); + _textEditingController = TextEditingController(); + } + + @override + void dispose() { + _textEditingController?.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '修改昵称', + body: Material( + color: Colors.white, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 32.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 55.w.heightBox, + '昵称'.text.black.size(28.sp).make(), + TextFormField( + controller: _textEditingController, + decoration: InputDecoration( + contentPadding: EdgeInsets.zero, + hintText: '', + hintStyle: + TextStyle(color: Color(0xFF999999), fontSize: 34.sp), + border: UnderlineInputBorder( + borderSide: BorderSide( + color: Color(0xFFEEEEEE), + width: 1.w, + )), + ), + ), + 150.w.heightBox, + MaterialButton( + onPressed: () { + // userProvider.setName(_textEditingController.text); + Get.back(); + }, + child: '保存'.text.black.size(32.sp).make(), + color: Color(0xFFFFC40C), + elevation: 0, + minWidth: 686.w, + height: 85.w, + ), + 24.w.heightBox, + '为保护个人隐私,在与邻里交往时显示昵称,默认为真实姓名,您可自行修改' + .text + .color(Color(0xFF999999)) + .size(24.sp) + .maxLines(2) + .make() + ], + ), + ), + ), + ); + } +}