개짐현상들 조치
This commit is contained in:
parent
8a68d77ba7
commit
eb51a6f6ee
@ -174,8 +174,8 @@ class _ScoreEditDialogState extends State<ScoreEditDialog> {
|
|||||||
child: GridView.count(
|
child: GridView.count(
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
mainAxisSpacing: 8,
|
mainAxisSpacing: 8,
|
||||||
crossAxisSpacing: 8,
|
crossAxisSpacing: 12,
|
||||||
childAspectRatio: 2.0,
|
childAspectRatio: 3.0,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: [
|
children: [
|
||||||
@ -222,7 +222,10 @@ class _ScoreEditDialogState extends State<ScoreEditDialog> {
|
|||||||
|
|
||||||
Widget _buildDeltaButton(int delta) {
|
Widget _buildDeltaButton(int delta) {
|
||||||
final label = (delta >= 0) ? '+$delta' : '$delta';
|
final label = (delta >= 0) ? '+$delta' : '$delta';
|
||||||
return ElevatedButton(
|
return SizedBox(
|
||||||
|
width: 50,
|
||||||
|
height: 30,
|
||||||
|
child: ElevatedButton(
|
||||||
onPressed: () => _onDelta(delta),
|
onPressed: () => _onDelta(delta),
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
@ -230,6 +233,7 @@ class _ScoreEditDialogState extends State<ScoreEditDialog> {
|
|||||||
side: const BorderSide(color: Colors.black),
|
side: const BorderSide(color: Colors.black),
|
||||||
),
|
),
|
||||||
child: Text(label),
|
child: Text(label),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,30 +28,51 @@ class _SurveyDialogState extends State<SurveyDialog> {
|
|||||||
bool _todayNotSee = false;
|
bool _todayNotSee = false;
|
||||||
// "오늘 하루 보지 않기" 체크 여부
|
// "오늘 하루 보지 않기" 체크 여부
|
||||||
|
|
||||||
|
// Scale factor for font size (폰트 크기 조절 스케일 인자)
|
||||||
|
double scaleFactor = 1.0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
_updateScaleFactor();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adjust font size by screen width (화면 크기에 따라 폰트 크기 조절)
|
||||||
|
void _updateScaleFactor() {
|
||||||
|
final screenWidth = MediaQuery.of(context).size.width;
|
||||||
|
const baseWidth = 400.0;
|
||||||
|
setState(() {
|
||||||
|
scaleFactor = (screenWidth / baseWidth).clamp(0.8, 1.4);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: const Text('Survey Participation Notice'),
|
title: Text('Survey Participation Notice', style: TextStyle(fontSize: 24 * scaleFactor)),
|
||||||
// '설문 참여 안내'
|
// '설문 참여 안내'
|
||||||
content: SingleChildScrollView(
|
content: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
Text(
|
||||||
'Hello, thank you for using the "ALLSCORE" app.\n\n'
|
'Hello, thank you for using the "ALLSCORE" app.\n\n'
|
||||||
'We have prepared a simple survey to provide better service.\n'
|
'We have prepared a simple survey to provide better service.\n'
|
||||||
'Your participation will greatly help the app’s improvement!\n'
|
'Your participation will greatly help the app’s improvement!\n'
|
||||||
'(It takes about 1 minute.)'
|
'(It takes about 1 minute.)',
|
||||||
// '안녕하세요, "올스코어" 앱을 이용해주셔서 감사합니다.\n\n'
|
// '안녕하세요, "올스코어" 앱을 이용해주셔서 감사합니다.\n\n'
|
||||||
// '더 나은 서비스 제공을 위해 간단한 설문조사를 준비했습니다.\n'
|
// '더 나은 서비스 제공을 위해 간단한 설문조사를 준비했습니다.\n'
|
||||||
// '설문조사에 참여해주시면 앱 발전에 큰 도움이 됩니다!\n'
|
// '설문조사에 참여해주시면 앱 발전에 큰 도움이 됩니다!\n'
|
||||||
// '(약 1분 소요)'
|
// '(약 1분 소요)'
|
||||||
|
style: TextStyle(fontSize: 15 * scaleFactor),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
// "Today do not see again" checkbox ("오늘 하루 보지 않기" 체크박스)
|
// "Today do not see again" checkbox ("오늘 하루 보지 않기" 체크박스)
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Checkbox(
|
Transform.scale(
|
||||||
|
scale: scaleFactor,
|
||||||
|
child: Checkbox(
|
||||||
value: _todayNotSee,
|
value: _todayNotSee,
|
||||||
onChanged: (val) {
|
onChanged: (val) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -59,7 +80,8 @@ class _SurveyDialogState extends State<SurveyDialog> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Text('Do not show again today'),
|
),
|
||||||
|
Text('Do not show again today', style: TextStyle(fontSize: 12 * scaleFactor)),
|
||||||
// '오늘 하루 보지 않기'
|
// '오늘 하루 보지 않기'
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -80,10 +102,10 @@ class _SurveyDialogState extends State<SurveyDialog> {
|
|||||||
Navigator.pop(context); // close popup (팝업 닫기)
|
Navigator.pop(context); // close popup (팝업 닫기)
|
||||||
},
|
},
|
||||||
style: TextButton.styleFrom(backgroundColor: Colors.grey),
|
style: TextButton.styleFrom(backgroundColor: Colors.grey),
|
||||||
child: const Text(
|
child: Text(
|
||||||
'Close',
|
'Close',
|
||||||
// '닫기'
|
// '닫기'
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// "Participate in Survey" button ("설문 참여" 버튼)
|
// "Participate in Survey" button ("설문 참여" 버튼)
|
||||||
@ -103,10 +125,10 @@ class _SurveyDialogState extends State<SurveyDialog> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
style: TextButton.styleFrom(backgroundColor: Colors.black),
|
style: TextButton.styleFrom(backgroundColor: Colors.black),
|
||||||
child: const Text(
|
child: Text(
|
||||||
'Participate in Survey',
|
'Participate in Survey',
|
||||||
// '설문 참여'
|
// '설문 참여'
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -152,7 +152,7 @@ class _TeamNameEditModalState extends State<TeamNameEditModal> {
|
|||||||
width: 80,
|
width: 80,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: _onUpdateTeamName,
|
onPressed: _onUpdateTeamName,
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Update'
|
'Update'
|
||||||
// '수정'
|
// '수정'
|
||||||
@ -165,7 +165,7 @@ class _TeamNameEditModalState extends State<TeamNameEditModal> {
|
|||||||
width: 80,
|
width: 80,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Cancel'
|
'Cancel'
|
||||||
// '취소'
|
// '취소'
|
||||||
|
@ -234,11 +234,15 @@ class _UserInfoPrivateDialogState extends State<UserInfoPrivateDialog> {
|
|||||||
Text(
|
Text(
|
||||||
userName,
|
userName,
|
||||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 6),
|
||||||
Text(
|
Text(
|
||||||
department,
|
department,
|
||||||
style: const TextStyle(fontSize: 14),
|
style: const TextStyle(fontSize: 14),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 2,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -329,41 +333,50 @@ class _UserInfoPrivateDialogState extends State<UserInfoPrivateDialog> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: scaleFactor==0.8 ? 50 : 90,
|
width: 80 * scaleFactor,
|
||||||
|
height: 40 * scaleFactor,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: _onUpdateUserInfo,
|
onPressed: _onUpdateUserInfo,
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: AutoSizeText(
|
child: FittedBox(
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
child: Text(
|
||||||
'Update'
|
'Update'
|
||||||
/* '수정' */,
|
/* '수정' */,
|
||||||
maxLines: 1,
|
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
|
||||||
style: const TextStyle(color: Colors.white),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: scaleFactor==0.8 ? 50 : 90,
|
width: 80 * scaleFactor,
|
||||||
|
height: 40 * scaleFactor,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: _onKickParticipant,
|
onPressed: _onKickParticipant,
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: AutoSizeText(
|
child: FittedBox(
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
child: Text(
|
||||||
'Kick'
|
'Kick'
|
||||||
/* '추방' */,
|
/* '추방' */,
|
||||||
maxLines: 1,
|
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
|
||||||
style: const TextStyle(color: Colors.white),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: scaleFactor==0.8 ? 50 : 90,
|
width: 80 * scaleFactor,
|
||||||
|
height: 40 * scaleFactor,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: AutoSizeText(
|
child: FittedBox(
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
child: Text(
|
||||||
'OK'
|
'OK'
|
||||||
/* '확인' */,
|
/* '확인' */,
|
||||||
maxLines: 1,
|
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
|
||||||
style: const TextStyle(color: Colors.white),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -372,12 +385,14 @@ class _UserInfoPrivateDialogState extends State<UserInfoPrivateDialog> {
|
|||||||
] else ...[
|
] else ...[
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: AutoSizeText(
|
child: FittedBox(
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
child: Text(
|
||||||
'OK'
|
'OK'
|
||||||
/* '확인' */,
|
/* '확인' */,
|
||||||
maxLines: 1,
|
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
|
||||||
style: const TextStyle(color: Colors.white),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -250,11 +250,15 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
|
|||||||
Text(
|
Text(
|
||||||
userName,
|
userName,
|
||||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 6),
|
||||||
Text(
|
Text(
|
||||||
department,
|
department,
|
||||||
style: const TextStyle(fontSize: 14),
|
style: const TextStyle(fontSize: 14),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 2,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -378,10 +382,11 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
|
|||||||
children: [
|
children: [
|
||||||
// "Update" (수정하기)
|
// "Update" (수정하기)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: scaleFactor==0.8 ? 75 : 90,
|
width: 80 * scaleFactor,
|
||||||
|
height: 40 * scaleFactor,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: _onUpdateUserInfo,
|
onPressed: _onUpdateUserInfo,
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: AutoSizeText(
|
child: AutoSizeText(
|
||||||
'Update'
|
'Update'
|
||||||
/* '수정' */,
|
/* '수정' */,
|
||||||
@ -392,10 +397,11 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
|
|||||||
),
|
),
|
||||||
// "Kick" (추방하기)
|
// "Kick" (추방하기)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: scaleFactor==0.8 ? 75 : 90,
|
width: 80 * scaleFactor,
|
||||||
|
height: 40 * scaleFactor,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: _onKickParticipant,
|
onPressed: _onKickParticipant,
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: AutoSizeText(
|
child: AutoSizeText(
|
||||||
'Kick'
|
'Kick'
|
||||||
/* '추방' */,
|
/* '추방' */,
|
||||||
@ -406,10 +412,11 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
|
|||||||
),
|
),
|
||||||
// "OK" (확인)
|
// "OK" (확인)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: scaleFactor==0.8 ? 75 : 90,
|
width: 80 * scaleFactor,
|
||||||
|
height: 40 * scaleFactor,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: AutoSizeText(
|
child: AutoSizeText(
|
||||||
'OK'
|
'OK'
|
||||||
/* '확인' */,
|
/* '확인' */,
|
||||||
@ -424,7 +431,7 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
|
|||||||
// If not the master, only "OK" (일반 유저는 "확인"만)
|
// If not the master, only "OK" (일반 유저는 "확인"만)
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||||
child: AutoSizeText(
|
child: AutoSizeText(
|
||||||
'OK'
|
'OK'
|
||||||
/* '확인' */,
|
/* '확인' */,
|
||||||
|
@ -194,10 +194,12 @@ class _IdFindingPageState extends State<IdFindingPage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('ALL SCORE'
|
title: const Text('ALL SCORE', style: TextStyle(color: Colors.white)),
|
||||||
/* ALL SCORE */,
|
|
||||||
style: TextStyle(color: Colors.white)),
|
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
|
leading: IconButton(
|
||||||
|
icon: const Icon(Icons.chevron_left, color: Colors.white),
|
||||||
|
onPressed: () => Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (_) => const LoginPage()), (route) => false),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
@ -119,8 +119,12 @@ class _PwFindingPageState extends State<PwFindingPage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('ALL SCORE' /* ALL SCORE */, style: TextStyle(color: Colors.white)),
|
title: const Text('ALL SCORE', style: TextStyle(color: Colors.white)),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
|
leading: IconButton(
|
||||||
|
icon: const Icon(Icons.chevron_left, color: Colors.white),
|
||||||
|
onPressed: () => Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (_) => const LoginPage()), (route) => false),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
@ -24,6 +24,24 @@ class _SignUpPageState extends State<SignUpPage> {
|
|||||||
// 오류 메시지 (유효성 검사)
|
// 오류 메시지 (유효성 검사)
|
||||||
String? _usernameError, _passwordError, _confirmPasswordError, _nicknameError, _emailError;
|
String? _usernameError, _passwordError, _confirmPasswordError, _nicknameError, _emailError;
|
||||||
|
|
||||||
|
// Scale factor for font size (폰트 크기 조절 스케일 인자)
|
||||||
|
double scaleFactor = 1.0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
_updateScaleFactor();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adjust font size by screen width (화면 크기에 따라 폰트 크기 조절)
|
||||||
|
void _updateScaleFactor() {
|
||||||
|
final screenWidth = MediaQuery.of(context).size.width;
|
||||||
|
const baseWidth = 400.0;
|
||||||
|
setState(() {
|
||||||
|
scaleFactor = (screenWidth / baseWidth).clamp(0.8, 1.4);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 유효성 검사 (아이디, 비밀번호, 이메일, 닉네임)
|
// 유효성 검사 (아이디, 비밀번호, 이메일, 닉네임)
|
||||||
bool _isUsernameValid(String username) =>
|
bool _isUsernameValid(String username) =>
|
||||||
RegExp(r'^(?![0-9])[A-Za-z0-9]{6,20}$').hasMatch(username);
|
RegExp(r'^(?![0-9])[A-Za-z0-9]{6,20}$').hasMatch(username);
|
||||||
@ -33,7 +51,7 @@ class _SignUpPageState extends State<SignUpPage> {
|
|||||||
bool _isEmailValid(String email) =>
|
bool _isEmailValid(String email) =>
|
||||||
RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(email);
|
RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(email);
|
||||||
bool _isNicknameValid(String nickname) =>
|
bool _isNicknameValid(String nickname) =>
|
||||||
RegExp(r'^[A-Za-z가-힣0-9]{2,20}$').hasMatch(nickname);
|
RegExp(r'^[A-Za-z가-힣0-9\s]{2,20}$').hasMatch(nickname);
|
||||||
|
|
||||||
// label에 따른 입력값 검사
|
// label에 따른 입력값 검사
|
||||||
void _validateInput(String label) {
|
void _validateInput(String label) {
|
||||||
@ -41,7 +59,7 @@ class _SignUpPageState extends State<SignUpPage> {
|
|||||||
if (label == 'Username') { // '아이디'
|
if (label == 'Username') { // '아이디'
|
||||||
_usernameError = _isUsernameValid(_username)
|
_usernameError = _isUsernameValid(_username)
|
||||||
? null
|
? null
|
||||||
: 'Username must be 6–20 characters, letters and digits, and cannot start with a digit.';
|
: 'Nickname must be 2–20 characters, letters and digits. Spaces are also allowed';
|
||||||
} else if (label == 'Password') { // '비밀번호'
|
} else if (label == 'Password') { // '비밀번호'
|
||||||
_passwordError = _isPasswordValidPattern(_password)
|
_passwordError = _isPasswordValidPattern(_password)
|
||||||
? null
|
? null
|
||||||
@ -176,7 +194,7 @@ class _SignUpPageState extends State<SignUpPage> {
|
|||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.chevron_left, color: Colors.white),
|
icon: const Icon(Icons.chevron_left, color: Colors.white),
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (_) => const LoginPage()), (route) => false),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
@ -232,7 +250,9 @@ class _SignUpPageState extends State<SignUpPage> {
|
|||||||
// 동의 체크박스
|
// 동의 체크박스
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Checkbox(
|
Transform.scale(
|
||||||
|
scale: scaleFactor,
|
||||||
|
child: Checkbox(
|
||||||
value: _isAgreed,
|
value: _isAgreed,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -240,7 +260,20 @@ class _SignUpPageState extends State<SignUpPage> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Text('I agree to the collection and use of my personal information.'),
|
),
|
||||||
|
// Checkbox와 텍스트 사이 간격
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
|
||||||
|
// Expanded로 Text 감싸기
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
'I agree to the collection and use of my personal information.',
|
||||||
|
style: const TextStyle(fontSize: 12),
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
// softWrap: true, // 기본값이 true이므로 생략 가능
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
@ -223,6 +223,8 @@ class _FinishPrivatePageState extends State<FinishPrivatePage> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
nickname,
|
nickname,
|
||||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text('$score pt', // '$score 점'
|
Text('$score pt', // '$score 점'
|
||||||
|
@ -280,6 +280,7 @@ class _FinishTeamPageState extends State<FinishTeamPage> {
|
|||||||
nickname,
|
nickname,
|
||||||
style: const TextStyle(fontSize: 11),
|
style: const TextStyle(fontSize: 11),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -277,7 +277,7 @@ class _MainPageState extends State<MainPage> {
|
|||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
label,
|
label,
|
||||||
style: const TextStyle(color: Colors.black),
|
style: TextStyle(color: Colors.black, fontSize: 12 * scaleFactor),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -435,6 +435,7 @@ class _PlayingPrivatePageState extends State<PlayingPrivatePage> {
|
|||||||
nickname,
|
nickname,
|
||||||
style: TextStyle(fontSize: 11, color: hasExited ? Colors.redAccent : Colors.black),
|
style: TextStyle(fontSize: 11, color: hasExited ? Colors.redAccent : Colors.black),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -628,6 +628,7 @@ class _PlayingTeamPageState extends State<PlayingTeamPage> {
|
|||||||
color: hasExited ? Colors.redAccent : Colors.black,
|
color: hasExited ? Colors.redAccent : Colors.black,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -307,12 +307,14 @@ class _RoomSearchListPageState extends State<RoomSearchListPage> {
|
|||||||
Text(
|
Text(
|
||||||
roomTitle,
|
roomTitle,
|
||||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text('$nickname / $roomStatus / $openYn / $nowPeople/$maxPeople'),
|
Text('$nickname / $roomStatus / $openYn / $nowPeople/$maxPeople', overflow: TextOverflow.ellipsis, maxLines: 1),
|
||||||
// ex) '유저 / 대기중 / 공개 / 3/10명'
|
// ex) '유저 / 대기중 / 공개 / 3/10명'
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(roomIntro, style: const TextStyle(fontSize: 12)),
|
Text(roomIntro, style: const TextStyle(fontSize: 12), overflow: TextOverflow.ellipsis, maxLines: 1),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -415,6 +415,9 @@ class _WaitingRoomPrivatePageState extends State<WaitingRoomPrivatePage> {
|
|||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
foregroundColor: Colors.black,
|
foregroundColor: Colors.black,
|
||||||
side: const BorderSide(color: Colors.black, width: 1),
|
side: const BorderSide(color: Colors.black, width: 1),
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
minimumSize: Size(0, 30),
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (roomMasterYn == 'Y') {
|
if (roomMasterYn == 'Y') {
|
||||||
@ -810,6 +813,8 @@ class _WaitingRoomPrivatePageState extends State<WaitingRoomPrivatePage> {
|
|||||||
Text(
|
Text(
|
||||||
displayName,
|
displayName,
|
||||||
style: const TextStyle(fontSize: 12, color: Colors.black),
|
style: const TextStyle(fontSize: 12, color: Colors.black),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -961,6 +961,8 @@ class _WaitingRoomTeamPageState extends State<WaitingRoomTeamPage> {
|
|||||||
Text(
|
Text(
|
||||||
displayName,
|
displayName,
|
||||||
style: const TextStyle(fontSize: 12, color: Colors.black),
|
style: const TextStyle(fontSize: 12, color: Colors.black),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -198,8 +198,8 @@ class _MyPageState extends State<MyPage> {
|
|||||||
user_nickname = newNickname;
|
user_nickname = newNickname;
|
||||||
// 닉네임 패턴 검증
|
// 닉네임 패턴 검증
|
||||||
if (!_isNicknameValidPattern(user_nickname)) {
|
if (!_isNicknameValidPattern(user_nickname)) {
|
||||||
_nicknameError = 'Nickname must be 2-20 characters (letters, Korean, digits).';
|
_nicknameError = 'Nickname must be 2-20 characters (letters, Korean, digits, spaces).';
|
||||||
// '닉네임은 2~20자 (영문, 한글, 숫자)만 허용'
|
// '닉네임은 2~20자 (영문, 한글, 숫자, 공백)만 허용'
|
||||||
} else {
|
} else {
|
||||||
_nicknameError = null;
|
_nicknameError = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user