1
0
forked from baron/baron-sso

style(userfront): apply dart format

This commit is contained in:
2026-03-27 18:10:32 +09:00
parent 6192220ec1
commit f8d10c90b8
3 changed files with 71 additions and 34 deletions

View File

@@ -1470,9 +1470,11 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
),
controller: _passwordLoginIdController,
decoration: InputDecoration(
labelText: _loginIdLabel ?? tr(
'ui.userfront.login.field.login_id',
),
labelText:
_loginIdLabel ??
tr(
'ui.userfront.login.field.login_id',
),
border: const OutlineInputBorder(),
prefixIcon: const Icon(
Icons.person_outline,

View File

@@ -1446,42 +1446,68 @@ class _SignupScreenState extends State<SignupScreen> {
border: const OutlineInputBorder(),
errorText: _loginIdError,
suffixIcon: TextButton(
onPressed: _isLoading ? null : () async {
final loginId = _loginIdController.text.trim();
if (loginId.isEmpty) {
setState(() => _loginIdError = 'ID를 입력해주세요.');
return;
}
setState(() {
_isLoading = true;
_loginIdError = null;
_loginIdSuccess = null;
});
try {
final result = await AuthProxyService.checkLoginIDAvailability(loginId, companyCode: _affiliationType == 'AFFILIATE' ? _companyCode : null);
setState(() {
if (result['available'] == true) {
_loginIdSuccess = '사용 가능한 ID입니다.';
} else {
_loginIdError = result['message'] ?? '사용할 수 없는 ID입니다.';
}
});
} catch (e) {
setState(() => _loginIdError = e.toString().replaceAll('Exception: ', ''));
} finally {
if (mounted) setState(() => _isLoading = false);
}
},
onPressed: _isLoading
? null
: () async {
final loginId = _loginIdController.text
.trim();
if (loginId.isEmpty) {
setState(
() => _loginIdError = 'ID를 입력해주세요.',
);
return;
}
setState(() {
_isLoading = true;
_loginIdError = null;
_loginIdSuccess = null;
});
try {
final result =
await AuthProxyService.checkLoginIDAvailability(
loginId,
companyCode:
_affiliationType ==
'AFFILIATE'
? _companyCode
: null,
);
setState(() {
if (result['available'] == true) {
_loginIdSuccess = '사용 가능한 ID입니다.';
} else {
_loginIdError =
result['message'] ??
'사용할 수 없는 ID입니다.';
}
});
} catch (e) {
setState(
() => _loginIdError = e
.toString()
.replaceAll('Exception: ', ''),
);
} finally {
if (mounted)
setState(() => _isLoading = false);
}
},
child: const Text('중복 확인'),
),
),
),
if (_loginIdSuccess != null)
Padding(
padding: const EdgeInsets.only(top: 8.0, left: 12.0),
padding: const EdgeInsets.only(
top: 8.0,
left: 12.0,
),
child: Text(
_loginIdSuccess!,
style: const TextStyle(color: Colors.green, fontSize: 12),
style: const TextStyle(
color: Colors.green,
fontSize: 12,
),
),
),
],