style: format code

This commit is contained in:
JingChiang
2024-09-08 20:28:52 +08:00
parent 994701e2ff
commit cf3abfc12b
7 changed files with 226 additions and 220 deletions

View File

@@ -126,7 +126,7 @@ class _RegisterPageState extends State<RegisterPage> {
String password = _passwordController.text;
String code = _codeController.text;
if (name == ''){
if (name == '') {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('用戶姓名不可為空')),
);
@@ -134,7 +134,7 @@ class _RegisterPageState extends State<RegisterPage> {
return false;
}
if (email == ''){
if (email == '') {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('電子信箱不可為空')),
);
@@ -142,7 +142,7 @@ class _RegisterPageState extends State<RegisterPage> {
return false;
}
if (password== ''){
if (password == '') {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('密碼不可為空')),
);
@@ -150,7 +150,7 @@ class _RegisterPageState extends State<RegisterPage> {
return false;
}
if (code != _generatedCode){
if (code != _generatedCode) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('驗證碼錯誤')),
);
@@ -208,7 +208,7 @@ class _RegisterPageState extends State<RegisterPage> {
} catch (e) {
print('資料庫錯誤: $e');
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('登入失敗:系統錯誤')),
SnackBar(content: Text('註冊失敗:系統錯誤')),
);
} finally {
await conn.close();
@@ -288,7 +288,7 @@ class _RegisterPageState extends State<RegisterPage> {
: Icons.visibility_off),
onPressed: () {
setState(
() {
() {
_passwordNotVisible = !_passwordNotVisible;
},
);