Compare commits
3 Commits
cf3abfc12b
...
7d06f83d38
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d06f83d38 | ||
|
|
c3533e6338 | ||
|
|
09d4346608 |
@@ -139,7 +139,6 @@ class _PersonalInfoState extends State<PersonalInfo> {
|
||||
} catch (e) {
|
||||
print('Error: $e');
|
||||
} finally {
|
||||
await conn.close();
|
||||
await conn.close();
|
||||
print('finally儲存更新狀態:$_isEditing');
|
||||
}
|
||||
|
||||
@@ -176,15 +176,16 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||
String password = _passwordController.text;
|
||||
|
||||
var result = await conn.execute(
|
||||
'SELECT * FROM HomeLogin WHERE homeEmail = :email AND homePassword = :password',
|
||||
{'email': email, 'password': password},
|
||||
'SELECT * FROM HomeLogin WHERE homeEmail = :email',
|
||||
{'email': email},
|
||||
);
|
||||
|
||||
if (result.rows.isNotEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('登入失敗:帳號或密碼錯誤')),
|
||||
SnackBar(content: Text('註冊失敗:電子信箱已被使用,請嘗試更換電子信箱')),
|
||||
);
|
||||
} else {
|
||||
// TODO: Phone Address is setting not null in database, remove it or setting default value
|
||||
await conn.execute(
|
||||
'INSERT INTO HomeLogin (homeName, homeEmail, homePassword) VALUES (:name, :email, :password)',
|
||||
{'name': name, 'email': email, 'password': password},
|
||||
|
||||
Reference in New Issue
Block a user