개짐현상들 조치

This commit is contained in:
eld_master 2025-01-30 01:34:46 +09:00
parent 8a68d77ba7
commit eb51a6f6ee
17 changed files with 178 additions and 77 deletions

View File

@ -174,8 +174,8 @@ class _ScoreEditDialogState extends State<ScoreEditDialog> {
child: GridView.count(
crossAxisCount: 2,
mainAxisSpacing: 8,
crossAxisSpacing: 8,
childAspectRatio: 2.0,
crossAxisSpacing: 12,
childAspectRatio: 3.0,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
children: [
@ -222,14 +222,18 @@ class _ScoreEditDialogState extends State<ScoreEditDialog> {
Widget _buildDeltaButton(int delta) {
final label = (delta >= 0) ? '+$delta' : '$delta';
return ElevatedButton(
onPressed: () => _onDelta(delta),
style: ElevatedButton.styleFrom(
return SizedBox(
width: 50,
height: 30,
child: ElevatedButton(
onPressed: () => _onDelta(delta),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
foregroundColor: Colors.black,
side: const BorderSide(color: Colors.black),
),
child: Text(label),
child: Text(label),
),
);
}
}

View File

@ -28,38 +28,60 @@ class _SurveyDialogState extends State<SurveyDialog> {
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
Widget build(BuildContext context) {
return AlertDialog(
title: const Text('Survey Participation Notice'),
title: Text('Survey Participation Notice', style: TextStyle(fontSize: 24 * scaleFactor)),
// '설문 참여 안내'
content: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text(
Text(
'Hello, thank you for using the "ALLSCORE" app.\n\n'
'We have prepared a simple survey to provide better service.\n'
'Your participation will greatly help the apps improvement!\n'
'(It takes about 1 minute.)'
'(It takes about 1 minute.)',
// '안녕하세요, "올스코어" 앱을 이용해주셔서 감사합니다.\n\n'
// '더 나은 서비스 제공을 위해 간단한 설문조사를 준비했습니다.\n'
// '설문조사에 참여해주시면 앱 발전에 큰 도움이 됩니다!\n'
// '(약 1분 소요)'
style: TextStyle(fontSize: 15 * scaleFactor),
),
const SizedBox(height: 16),
// "Today do not see again" checkbox ("오늘 하루 보지 않기" )
Row(
children: [
Checkbox(
value: _todayNotSee,
onChanged: (val) {
setState(() {
_todayNotSee = val ?? false;
});
},
Transform.scale(
scale: scaleFactor,
child: Checkbox(
value: _todayNotSee,
onChanged: (val) {
setState(() {
_todayNotSee = val ?? false;
});
},
),
),
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 ( )
},
style: TextButton.styleFrom(backgroundColor: Colors.grey),
child: const Text(
child: Text(
'Close',
// '닫기'
style: TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
),
),
// "Participate in Survey" button ("설문 참여" )
@ -103,10 +125,10 @@ class _SurveyDialogState extends State<SurveyDialog> {
);
},
style: TextButton.styleFrom(backgroundColor: Colors.black),
child: const Text(
child: Text(
'Participate in Survey',
// '설문 참여'
style: TextStyle(color: Colors.white),
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
),
),
],

View File

@ -152,7 +152,7 @@ class _TeamNameEditModalState extends State<TeamNameEditModal> {
width: 80,
child: ElevatedButton(
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(
'Update'
// '수정'
@ -165,7 +165,7 @@ class _TeamNameEditModalState extends State<TeamNameEditModal> {
width: 80,
child: ElevatedButton(
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(
'Cancel'
// '취소'

View File

@ -234,11 +234,15 @@ class _UserInfoPrivateDialogState extends State<UserInfoPrivateDialog> {
Text(
userName,
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
const SizedBox(height: 6),
Text(
department,
style: const TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
maxLines: 2,
),
],
),
@ -329,41 +333,50 @@ class _UserInfoPrivateDialogState extends State<UserInfoPrivateDialog> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: scaleFactor==0.8 ? 50 : 90,
width: 80 * scaleFactor,
height: 40 * scaleFactor,
child: ElevatedButton(
onPressed: _onUpdateUserInfo,
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
child: AutoSizeText(
'Update'
/* '수정' */,
maxLines: 1,
style: const TextStyle(color: Colors.white),
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
child: FittedBox(
fit: BoxFit.contain,
child: Text(
'Update'
/* '수정' */,
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
),
),
),
),
SizedBox(
width: scaleFactor==0.8 ? 50 : 90,
width: 80 * scaleFactor,
height: 40 * scaleFactor,
child: ElevatedButton(
onPressed: _onKickParticipant,
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
child: AutoSizeText(
'Kick'
/* '추방' */,
maxLines: 1,
style: const TextStyle(color: Colors.white),
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
child: FittedBox(
fit: BoxFit.contain,
child: Text(
'Kick'
/* '추방' */,
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
),
),
),
),
SizedBox(
width: scaleFactor==0.8 ? 50 : 90,
width: 80 * scaleFactor,
height: 40 * scaleFactor,
child: ElevatedButton(
onPressed: () => Navigator.pop(context),
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
child: AutoSizeText(
'OK'
/* '확인' */,
maxLines: 1,
style: const TextStyle(color: Colors.white),
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
child: FittedBox(
fit: BoxFit.contain,
child: Text(
'OK'
/* '확인' */,
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
),
),
),
),
@ -372,12 +385,14 @@ class _UserInfoPrivateDialogState extends State<UserInfoPrivateDialog> {
] else ...[
ElevatedButton(
onPressed: () => Navigator.pop(context),
style: ElevatedButton.styleFrom(backgroundColor: Colors.black),
child: AutoSizeText(
'OK'
/* '확인' */,
maxLines: 1,
style: const TextStyle(color: Colors.white),
style: ElevatedButton.styleFrom(backgroundColor: Colors.black, padding: EdgeInsets.zero, minimumSize: Size(0, 30), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
child: FittedBox(
fit: BoxFit.contain,
child: Text(
'OK'
/* '확인' */,
style: TextStyle(color: Colors.white, fontSize: 12 * scaleFactor),
),
),
),
],

View File

@ -250,11 +250,15 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
Text(
userName,
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
const SizedBox(height: 6),
Text(
department,
style: const TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
maxLines: 2,
),
],
),
@ -378,10 +382,11 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
children: [
// "Update" ()
SizedBox(
width: scaleFactor==0.8 ? 75 : 90,
width: 80 * scaleFactor,
height: 40 * scaleFactor,
child: ElevatedButton(
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(
'Update'
/* '수정' */,
@ -392,10 +397,11 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
),
// "Kick" ()
SizedBox(
width: scaleFactor==0.8 ? 75 : 90,
width: 80 * scaleFactor,
height: 40 * scaleFactor,
child: ElevatedButton(
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(
'Kick'
/* '추방' */,
@ -406,10 +412,11 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
),
// "OK" ()
SizedBox(
width: scaleFactor==0.8 ? 75 : 90,
width: 80 * scaleFactor,
height: 40 * scaleFactor,
child: ElevatedButton(
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(
'OK'
/* '확인' */,
@ -424,7 +431,7 @@ class _UserInfoTeamDialogState extends State<UserInfoTeamDialog> {
// If not the master, only "OK" ( "확인")
ElevatedButton(
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(
'OK'
/* '확인' */,

View File

@ -194,10 +194,12 @@ class _IdFindingPageState extends State<IdFindingPage> {
return Scaffold(
backgroundColor: Colors.white,
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,
leading: IconButton(
icon: const Icon(Icons.chevron_left, color: Colors.white),
onPressed: () => Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (_) => const LoginPage()), (route) => false),
),
),
body: Padding(
padding: const EdgeInsets.all(16.0),

View File

@ -119,8 +119,12 @@ class _PwFindingPageState extends State<PwFindingPage> {
return Scaffold(
backgroundColor: Colors.white,
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,
leading: IconButton(
icon: const Icon(Icons.chevron_left, color: Colors.white),
onPressed: () => Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (_) => const LoginPage()), (route) => false),
),
),
body: Padding(
padding: const EdgeInsets.all(16.0),

View File

@ -24,6 +24,24 @@ class _SignUpPageState extends State<SignUpPage> {
// ( )
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) =>
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) =>
RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(email);
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에
void _validateInput(String label) {
@ -41,7 +59,7 @@ class _SignUpPageState extends State<SignUpPage> {
if (label == 'Username') { // '아이디'
_usernameError = _isUsernameValid(_username)
? null
: 'Username must be 620 characters, letters and digits, and cannot start with a digit.';
: 'Nickname must be 220 characters, letters and digits. Spaces are also allowed';
} else if (label == 'Password') { // '비밀번호'
_passwordError = _isPasswordValidPattern(_password)
? null
@ -176,7 +194,7 @@ class _SignUpPageState extends State<SignUpPage> {
backgroundColor: Colors.black,
leading: IconButton(
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(
@ -232,15 +250,30 @@ class _SignUpPageState extends State<SignUpPage> {
//
Row(
children: [
Checkbox(
value: _isAgreed,
onChanged: (value) {
setState(() {
_isAgreed = value ?? false;
});
},
Transform.scale(
scale: scaleFactor,
child: Checkbox(
value: _isAgreed,
onChanged: (value) {
setState(() {
_isAgreed = value ?? false;
});
},
),
),
// 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 Text('I agree to the collection and use of my personal information.'),
],
),
const SizedBox(height: 16),

View File

@ -223,6 +223,8 @@ class _FinishPrivatePageState extends State<FinishPrivatePage> {
child: Text(
nickname,
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
),
Text('$score pt', // '$score'

View File

@ -280,6 +280,7 @@ class _FinishTeamPageState extends State<FinishTeamPage> {
nickname,
style: const TextStyle(fontSize: 11),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
],
),

View File

@ -277,7 +277,7 @@ class _MainPageState extends State<MainPage> {
),
child: Text(
label,
style: const TextStyle(color: Colors.black),
style: TextStyle(color: Colors.black, fontSize: 12 * scaleFactor),
textAlign: TextAlign.center,
),
),

View File

@ -435,6 +435,7 @@ class _PlayingPrivatePageState extends State<PlayingPrivatePage> {
nickname,
style: TextStyle(fontSize: 11, color: hasExited ? Colors.redAccent : Colors.black),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
],
),

View File

@ -628,6 +628,7 @@ class _PlayingTeamPageState extends State<PlayingTeamPage> {
color: hasExited ? Colors.redAccent : Colors.black,
),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
],
),

View File

@ -307,12 +307,14 @@ class _RoomSearchListPageState extends State<RoomSearchListPage> {
Text(
roomTitle,
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
const SizedBox(height: 4),
Text('$nickname / $roomStatus / $openYn / $nowPeople/$maxPeople'),
Text('$nickname / $roomStatus / $openYn / $nowPeople/$maxPeople', overflow: TextOverflow.ellipsis, maxLines: 1),
// ex) '유저 / 대기중 / 공개 / 3/10명'
const SizedBox(height: 4),
Text(roomIntro, style: const TextStyle(fontSize: 12)),
Text(roomIntro, style: const TextStyle(fontSize: 12), overflow: TextOverflow.ellipsis, maxLines: 1),
],
),
),

View File

@ -415,6 +415,9 @@ class _WaitingRoomPrivatePageState extends State<WaitingRoomPrivatePage> {
backgroundColor: Colors.white,
foregroundColor: Colors.black,
side: const BorderSide(color: Colors.black, width: 1),
padding: EdgeInsets.zero,
minimumSize: Size(0, 30),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
);
if (roomMasterYn == 'Y') {
@ -810,6 +813,8 @@ class _WaitingRoomPrivatePageState extends State<WaitingRoomPrivatePage> {
Text(
displayName,
style: const TextStyle(fontSize: 12, color: Colors.black),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
],
),

View File

@ -961,6 +961,8 @@ class _WaitingRoomTeamPageState extends State<WaitingRoomTeamPage> {
Text(
displayName,
style: const TextStyle(fontSize: 12, color: Colors.black),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
],
),

View File

@ -198,8 +198,8 @@ class _MyPageState extends State<MyPage> {
user_nickname = newNickname;
//
if (!_isNicknameValidPattern(user_nickname)) {
_nicknameError = 'Nickname must be 2-20 characters (letters, Korean, digits).';
// '닉네임은 2~20자 (영문, 한글, 숫자)만 허용'
_nicknameError = 'Nickname must be 2-20 characters (letters, Korean, digits, spaces).';
// '닉네임은 2~20자 (영문, 한글, 숫자, 공백)만 허용'
} else {
_nicknameError = null;
}