-
Notifications
You must be signed in to change notification settings - Fork 0
/
security_change_phone.dart
executable file
·106 lines (99 loc) · 3.23 KB
/
security_change_phone.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:worldfunclub/providers.dart';
import 'package:worldfunclub/vm/security_change_phone_page_provider.dart';
import 'package:worldfunclub/widgets/item_tile.dart';
class SecurityChangePhonePage
extends ProviderWidget<SecurityChangePhonePageProvider> {
SecurityChangePhonePage() : super();
@override
Widget buildContent(
BuildContext context, SecurityChangePhonePageProvider provider) {
return _SecurityChangePhonePageContent(provider);
}
}
class _SecurityChangePhonePageContent extends StatefulWidget {
final SecurityChangePhonePageProvider provider;
_SecurityChangePhonePageContent(this.provider);
@override
_SecurityChangePhonePageContentState createState() =>
_SecurityChangePhonePageContentState();
}
class _SecurityChangePhonePageContentState
extends State<_SecurityChangePhonePageContent> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("手机号更换"),brightness: Brightness.dark,
),
body: Container(
child: Column(
children: [
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 14.w),
width: double.infinity,
height: 55.w,
color: Color(0xfff5f5f5),
child: Text("绑定新的手机号码"),
),
EditorLinearBar(
title: "手机号:",
editor: TextField(
onChanged: (s) {
widget.provider.phone = s;
},
keyboardType: TextInputType.phone,
decoration: InputDecoration(
border: InputBorder.none, hintText: "请输入手机号"),
),
),
SizedBox(
height: 1.w,
),
EditorLinearBar(
onTap: () {
widget.provider.sendChangePhoneAuthCode();
},
commit: "获取验证码",
title: "验证码:",
editor: TextField(
onChanged: (s) {
widget.provider.code = s;
},
decoration: InputDecoration(
border: InputBorder.none, hintText: "请输入验证码"),
),
),
SizedBox(
height: 56.w,
),
GestureDetector(
onTap: () {
widget.provider.confirmChange(context);
},
child: Container(
width: double.infinity,
height: 48.w,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(24.w)),
color: Color(0xFFE33541)),
margin: EdgeInsets.symmetric(horizontal: 14.w),
child: Text(
"确定",
style: TextStyle(color: Colors.white, fontSize: 16.sp),
),
),
),
],
),
),
);
}
}