From 765470c5cfea80008f71022b87e19b2a2075af71 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Sat, 16 Jan 2021 15:47:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E7=BD=AE=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sign/sign_up/sign_up_pick_role_page.dart | 6 +- .../sign_up/sign_up_set_nickname_page.dart | 62 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 lib/pages/sign/sign_up/sign_up_set_nickname_page.dart diff --git a/lib/pages/sign/sign_up/sign_up_pick_role_page.dart b/lib/pages/sign/sign_up/sign_up_pick_role_page.dart index 46fb8577..6723861f 100644 --- a/lib/pages/sign/sign_up/sign_up_pick_role_page.dart +++ b/lib/pages/sign/sign_up/sign_up_pick_role_page.dart @@ -1,8 +1,10 @@ import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/pages/sign/sign_up/sign_up_common_widget.dart'; +import 'package:akuCommunity/pages/sign/sign_up/sign_up_set_nickname_page.dart'; import 'package:akuCommunity/provider/sign_up_provider.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:flutter/material.dart'; +import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; @@ -26,6 +28,8 @@ class _SignUpPickRolePageState extends State { @override Widget build(BuildContext context) { + final signUpProvider = Provider.of(context); + return Scaffold( body: ListView( padding: EdgeInsets.symmetric(horizontal: 32.w), @@ -51,7 +55,7 @@ class _SignUpPickRolePageState extends State { shape: StadiumBorder(), disabledColor: kPrimaryColor.withOpacity(0.3), child: '提交'.text.make(), - onPressed: () {}, + onPressed: () => Get.to(SignUpSetNicknamePage()), elevation: 0, ).pLTRB(82.w, 0, 82.w, 155.w), ); diff --git a/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart b/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart new file mode 100644 index 00000000..1fe4ae1d --- /dev/null +++ b/lib/pages/sign/sign_up/sign_up_set_nickname_page.dart @@ -0,0 +1,62 @@ +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/pages/sign/sign_up/sign_up_common_widget.dart'; +import 'package:akuCommunity/utils/headers.dart'; +import 'package:flutter/material.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class SignUpSetNicknamePage extends StatefulWidget { + SignUpSetNicknamePage({Key key}) : super(key: key); + + @override + _SignUpSetNicknamePageState createState() => _SignUpSetNicknamePageState(); +} + +class _SignUpSetNicknamePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: ListView( + padding: EdgeInsets.symmetric(horizontal: 32.w), + children: [ + 148.hb, + signUpTitle('设置昵称'), + 190.hb, + '请输入您的昵称'.text.size(32.sp).color(ktextPrimary).make(), + TextField( + decoration: InputDecoration( + border: UnderlineInputBorder( + borderSide: BorderSide(color: Color(0xFFD8D8D8)), + ), + hintText: '为保护个人隐私,在与邻居交流时将显示昵称', + ), + ), + ], + ), + bottomNavigationBar: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + MaterialButton( + color: kPrimaryColor, + elevation: 0, + height: 89.w, + child: '保存'.text.make(), + shape: StadiumBorder(), + onPressed: () {}, + ), + MaterialButton( + elevation: 0, + height: 89.w, + child: [ + Icon(Icons.cached_rounded), + 12.wb, + '换一换'.text.make(), + ].row(), + shape: StadiumBorder(), + onPressed: () {}, + ), + ], + ).pLTRB(82.w, 0, 82.w, 60.w), + ); + } +}