Compare commits
2 Commits
00ec7d262f
...
781d8dfcdf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
781d8dfcdf | ||
|
|
399f880054 |
@@ -14,13 +14,11 @@ class PersonalInfo extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _PersonalInfoState extends State<PersonalInfo> {
|
||||
String _name = '',
|
||||
_phone = '',
|
||||
_gender = '',
|
||||
_address = '',
|
||||
_email = '',
|
||||
_password = '';
|
||||
String _name = '', _phone = '', _gender = '', _address = '', _email = '', _password = '';
|
||||
|
||||
bool _isEditing = false; //是否為編輯狀態
|
||||
bool _passwordNotVisible = true;
|
||||
|
||||
final TextEditingController _nameController = TextEditingController();
|
||||
final TextEditingController _phoneController = TextEditingController();
|
||||
final TextEditingController _genderController = TextEditingController();
|
||||
@@ -158,8 +156,6 @@ class _PersonalInfoState extends State<PersonalInfo> {
|
||||
));
|
||||
}
|
||||
|
||||
//頁面
|
||||
|
||||
//頁面
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -257,6 +253,20 @@ class _PersonalInfoState extends State<PersonalInfo> {
|
||||
subtitle: _isEditing
|
||||
? TextField(
|
||||
controller: _passwordController,
|
||||
obscureText: _passwordNotVisible,
|
||||
decoration: InputDecoration(
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(_passwordNotVisible
|
||||
? Icons.visibility
|
||||
: Icons.visibility_off),
|
||||
onPressed: () {
|
||||
setState(
|
||||
() {
|
||||
_passwordNotVisible = !_passwordNotVisible;
|
||||
},
|
||||
);
|
||||
},
|
||||
)),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_password = value;
|
||||
|
||||
Reference in New Issue
Block a user