1
0
forked from baron/baron-sso

ci: enforce flutter/biome format checks and fix front lint violations

This commit is contained in:
Lectom C Han
2026-02-20 10:25:45 +09:00
parent 226a236bf2
commit c117e10f48
31 changed files with 472 additions and 709 deletions

View File

@@ -164,11 +164,7 @@ class _SignupScreenState extends State<SignupScreen> {
final email = _emailController.text.trim();
final emailRegex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
if (!emailRegex.hasMatch(email)) {
setState(
() => _emailError = tr(
'msg.userfront.signup.email.invalid',
),
);
setState(() => _emailError = tr('msg.userfront.signup.email.invalid'));
return;
}
setState(() {
@@ -179,9 +175,7 @@ class _SignupScreenState extends State<SignupScreen> {
final available = await AuthProxyService.checkEmailAvailability(email);
if (!available) {
setState(
() => _emailError = tr(
'msg.userfront.signup.email.duplicate',
),
() => _emailError = tr('msg.userfront.signup.email.duplicate'),
);
return;
}
@@ -217,9 +211,7 @@ class _SignupScreenState extends State<SignupScreen> {
});
} else {
setState(
() => _emailError = tr(
'msg.userfront.signup.email.code_mismatch',
),
() => _emailError = tr('msg.userfront.signup.email.code_mismatch'),
);
}
} catch (e) {
@@ -272,9 +264,7 @@ class _SignupScreenState extends State<SignupScreen> {
});
} else {
setState(
() => _phoneError = tr(
'msg.userfront.signup.phone.code_mismatch',
),
() => _phoneError = tr('msg.userfront.signup.phone.code_mismatch'),
);
}
} catch (e) {
@@ -329,17 +319,11 @@ class _SignupScreenState extends State<SignupScreen> {
'msg.userfront.signup.password.lowercase_required',
);
} else if (eStr.contains('digit') || eStr.contains('number')) {
_passwordError = tr(
'msg.userfront.signup.password.number_required',
);
_passwordError = tr('msg.userfront.signup.password.number_required');
} else if (eStr.contains('symbol') || eStr.contains('special')) {
_passwordError = tr(
'msg.userfront.signup.password.symbol_required',
);
_passwordError = tr('msg.userfront.signup.password.symbol_required');
} else if (eStr.contains('length') || eStr.contains('12 characters')) {
_passwordError = tr(
'msg.userfront.signup.password.length_required',
);
_passwordError = tr('msg.userfront.signup.password.length_required');
} else {
_passwordError = tr(
'msg.userfront.signup.failed',
@@ -357,18 +341,12 @@ class _SignupScreenState extends State<SignupScreen> {
context: context,
barrierDismissible: false,
builder: (context) => AlertDialog(
title: Text(
tr('msg.userfront.signup.success.title'),
),
content: Text(
tr('msg.userfront.signup.success.body'),
),
title: Text(tr('msg.userfront.signup.success.title')),
content: Text(tr('msg.userfront.signup.success.body')),
actions: [
TextButton(
onPressed: () => context.go('/signin'),
child: Text(
tr('ui.userfront.signup.success.action'),
),
child: Text(tr('ui.userfront.signup.success.action')),
),
],
),
@@ -382,25 +360,13 @@ class _SignupScreenState extends State<SignupScreen> {
padding: const EdgeInsets.symmetric(vertical: 20),
child: Row(
children: [
_stepCircle(
1,
tr('ui.userfront.signup.steps.agreement'),
),
_stepCircle(1, tr('ui.userfront.signup.steps.agreement')),
_stepLine(1),
_stepCircle(
2,
tr('ui.userfront.signup.steps.verify'),
),
_stepCircle(2, tr('ui.userfront.signup.steps.verify')),
_stepLine(2),
_stepCircle(
3,
tr('ui.userfront.signup.steps.profile'),
),
_stepCircle(3, tr('ui.userfront.signup.steps.profile')),
_stepLine(3),
_stepCircle(
4,
tr('ui.userfront.signup.steps.password'),
),
_stepCircle(4, tr('ui.userfront.signup.steps.password')),
],
),
);
@@ -454,9 +420,7 @@ class _SignupScreenState extends State<SignupScreen> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
tr(
'msg.userfront.signup.agreement.title',
),
tr('msg.userfront.signup.agreement.title'),
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
@@ -489,18 +453,14 @@ class _SignupScreenState extends State<SignupScreen> {
),
const SizedBox(height: 16),
_agreementSection(
title: tr(
'ui.userfront.signup.agreement.tos_title',
),
title: tr('ui.userfront.signup.agreement.tos_title'),
content: _tosText,
value: _termsAccepted,
onChanged: (val) => setState(() => _termsAccepted = val!),
),
const SizedBox(height: 16),
_agreementSection(
title: tr(
'ui.userfront.signup.agreement.privacy_title',
),
title: tr('ui.userfront.signup.agreement.privacy_title'),
content: _privacyText,
value: _privacyAccepted,
onChanged: (val) => setState(() => _privacyAccepted = val!),
@@ -745,9 +705,7 @@ class _SignupScreenState extends State<SignupScreen> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
tr(
'msg.userfront.signup.auth.title',
),
tr('msg.userfront.signup.auth.title'),
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
const SizedBox(height: 16),
@@ -764,9 +722,7 @@ class _SignupScreenState extends State<SignupScreen> {
const SizedBox(width: 8),
Expanded(
child: Text(
tr(
'msg.userfront.signup.auth.affiliate_notice',
),
tr('msg.userfront.signup.auth.affiliate_notice'),
style: const TextStyle(
fontSize: 12,
color: Colors.blue,
@@ -790,9 +746,7 @@ class _SignupScreenState extends State<SignupScreen> {
controller: _emailController,
onChanged: _checkEmailAffiliation, // 도메인 실시간 체크
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.auth.email.label',
),
labelText: tr('ui.userfront.signup.auth.email.label'),
border: const OutlineInputBorder(),
errorText: _emailError,
hintText: 'example@hanmaceng.co.kr',
@@ -815,9 +769,7 @@ class _SignupScreenState extends State<SignupScreen> {
child: Text(
_emailSeconds > 0
? tr('ui.common.resend')
: tr(
'ui.userfront.signup.auth.request_code',
),
: tr('ui.userfront.signup.auth.request_code'),
),
),
),
@@ -828,9 +780,7 @@ class _SignupScreenState extends State<SignupScreen> {
TextFormField(
controller: _emailCodeController,
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.auth.code_label',
),
labelText: tr('ui.userfront.signup.auth.code_label'),
suffixText: _formatTime(_emailSeconds),
border: const OutlineInputBorder(),
),
@@ -848,9 +798,7 @@ class _SignupScreenState extends State<SignupScreen> {
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
tr(
'msg.userfront.signup.email.verified',
),
tr('msg.userfront.signup.email.verified'),
style: const TextStyle(
color: Colors.green,
fontSize: 13,
@@ -870,9 +818,7 @@ class _SignupScreenState extends State<SignupScreen> {
child: TextFormField(
controller: _phoneController,
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.phone.label',
),
labelText: tr('ui.userfront.signup.phone.label'),
border: const OutlineInputBorder(),
errorText: _phoneError,
),
@@ -895,9 +841,7 @@ class _SignupScreenState extends State<SignupScreen> {
child: Text(
_phoneSeconds > 0
? tr('ui.common.resend')
: tr(
'ui.userfront.signup.auth.request_code',
),
: tr('ui.userfront.signup.auth.request_code'),
),
),
),
@@ -908,9 +852,7 @@ class _SignupScreenState extends State<SignupScreen> {
TextFormField(
controller: _phoneCodeController,
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.auth.code_label',
),
labelText: tr('ui.userfront.signup.auth.code_label'),
suffixText: _formatTime(_phoneSeconds),
border: const OutlineInputBorder(),
),
@@ -928,9 +870,7 @@ class _SignupScreenState extends State<SignupScreen> {
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
tr(
'msg.userfront.signup.phone.verified',
),
tr('msg.userfront.signup.phone.verified'),
style: const TextStyle(
color: Colors.green,
fontSize: 13,
@@ -947,9 +887,7 @@ class _SignupScreenState extends State<SignupScreen> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
tr(
'msg.userfront.signup.profile.title',
),
tr('msg.userfront.signup.profile.title'),
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
const SizedBox(height: 24),
@@ -971,28 +909,20 @@ class _SignupScreenState extends State<SignupScreen> {
key: ValueKey(_affiliationType),
initialValue: _affiliationType,
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.profile.affiliation_type',
),
labelText: tr('ui.userfront.signup.profile.affiliation_type'),
border: const OutlineInputBorder(),
helperText: _isAffiliateEmail
? tr(
'msg.userfront.signup.profile.affiliate_hint',
)
? tr('msg.userfront.signup.profile.affiliate_hint')
: null,
),
items: [
DropdownMenuItem(
value: 'GENERAL',
child: Text(
tr('domain.affiliation.general'),
),
child: Text(tr('domain.affiliation.general')),
),
DropdownMenuItem(
value: 'AFFILIATE',
child: Text(
tr('domain.affiliation.affiliate'),
),
child: Text(tr('domain.affiliation.affiliate')),
),
],
onChanged: _isAffiliateEmail
@@ -1019,9 +949,7 @@ class _SignupScreenState extends State<SignupScreen> {
key: ValueKey(_companyCode ?? 'none'),
initialValue: _companyCode,
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.profile.company',
),
labelText: tr('ui.userfront.signup.profile.company'),
border: const OutlineInputBorder(),
),
items: [
@@ -1064,9 +992,7 @@ class _SignupScreenState extends State<SignupScreen> {
decoration: InputDecoration(
labelText: _affiliationType == 'AFFILIATE'
? tr('ui.userfront.signup.profile.department')
: tr(
'ui.userfront.signup.profile.department_optional',
),
: tr('ui.userfront.signup.profile.department_optional'),
border: const OutlineInputBorder(),
),
),
@@ -1076,9 +1002,7 @@ class _SignupScreenState extends State<SignupScreen> {
String _buildPolicyDescription() {
if (_isPolicyLoading) {
return tr(
'msg.userfront.signup.policy.loading',
);
return tr('msg.userfront.signup.policy.loading');
}
final minLength = (_policy?['minLength'] as int?) ?? 12;
final minTypes = (_policy?['minCharacterTypes'] as int?) ?? 0;
@@ -1147,9 +1071,7 @@ class _SignupScreenState extends State<SignupScreen> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
tr(
'msg.userfront.signup.password.title',
),
tr('msg.userfront.signup.password.title'),
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
const SizedBox(height: 16),
@@ -1183,9 +1105,7 @@ class _SignupScreenState extends State<SignupScreen> {
obscureText: true,
onChanged: (_) => setState(() {}),
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.password.label',
),
labelText: tr('ui.userfront.signup.password.label'),
border: const OutlineInputBorder(),
errorText: _passwordError,
),
@@ -1211,16 +1131,12 @@ class _SignupScreenState extends State<SignupScreen> {
),
if (requiresUpper)
_cryptoCheck(
tr(
'msg.userfront.signup.password.rule.uppercase',
),
tr('msg.userfront.signup.password.rule.uppercase'),
hasUpper,
),
if (requiresLower)
_cryptoCheck(
tr(
'msg.userfront.signup.password.rule.lowercase',
),
tr('msg.userfront.signup.password.rule.lowercase'),
hasLower,
),
if (requiresNumber)
@@ -1230,9 +1146,7 @@ class _SignupScreenState extends State<SignupScreen> {
),
if (requiresSymbol)
_cryptoCheck(
tr(
'msg.userfront.signup.password.rule.symbol',
),
tr('msg.userfront.signup.password.rule.symbol'),
hasSpecial,
),
],
@@ -1244,16 +1158,12 @@ class _SignupScreenState extends State<SignupScreen> {
onChanged: (val) {
setState(() {
_confirmPasswordError = (val != _passwordController.text)
? tr(
'msg.userfront.signup.password.mismatch',
)
? tr('msg.userfront.signup.password.mismatch')
: null;
});
},
decoration: InputDecoration(
labelText: tr(
'ui.userfront.signup.password.confirm_label',
),
labelText: tr('ui.userfront.signup.password.confirm_label'),
border: const OutlineInputBorder(),
errorText: _confirmPasswordError,
),
@@ -1379,12 +1289,8 @@ class _SignupScreenState extends State<SignupScreen> {
)
: Text(
_currentStep < 4
? tr(
'ui.userfront.signup.next_step',
)
: tr(
'ui.userfront.signup.complete',
),
? tr('ui.userfront.signup.next_step')
: tr('ui.userfront.signup.complete'),
),
),
),