로그인 화면 아이디/비밀번호 입력칸 폭 제한 (데스크톱 웹에서 너무 넓게 늘어지던 문제 수정)

This commit is contained in:
2026-08-05 14:07:06 +09:00
parent 4e12b279e2
commit dca7912f8d
+111 -104
View File
@@ -421,121 +421,128 @@ class _LoginScreenState extends State<LoginScreen> {
body: Center( body: Center(
child: SingleChildScrollView( child: SingleChildScrollView(
padding: const EdgeInsets.all(24.0), padding: const EdgeInsets.all(24.0),
child: Column( child: ConstrainedBox(
mainAxisAlignment: MainAxisAlignment.center, constraints: const BoxConstraints(maxWidth: 420),
children: [ child: Column(
const Icon(Icons.school, size: 80, color: Colors.indigo), mainAxisAlignment: MainAxisAlignment.center,
const SizedBox(height: 16), children: [
const Text( const Icon(Icons.school, size: 80, color: Colors.indigo),
'백산고등학교 모니터', const SizedBox(height: 16),
style: TextStyle( const Text(
fontSize: 26, '백산고등학교 모니터',
fontWeight: FontWeight.bold, style: TextStyle(
color: Colors.indigo, fontSize: 26,
fontWeight: FontWeight.bold,
color: Colors.indigo,
),
), ),
), const SizedBox(height: 8),
const SizedBox(height: 8), const Text(
const Text( '학생 편의 및 학교생활 도우미',
'학생 편의 및 학교생활 도우미', style: TextStyle(color: Colors.grey, fontSize: 15),
style: TextStyle(color: Colors.grey, fontSize: 15),
),
const SizedBox(height: 40),
TextField(
controller: _idController,
textInputAction: TextInputAction.next,
decoration: const InputDecoration(
labelText: '학번 또는 교직원 번호',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.person),
), ),
), const SizedBox(height: 40),
const SizedBox(height: 16), TextField(
TextField( controller: _idController,
controller: _pwController, textInputAction: TextInputAction.next,
obscureText: true, decoration: const InputDecoration(
textInputAction: TextInputAction.done, labelText: '학번 또는 교직원 번호',
onSubmitted: (_) => _login(), border: OutlineInputBorder(),
decoration: const InputDecoration( prefixIcon: Icon(Icons.person),
labelText: '비밀번호', ),
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.lock),
), ),
), const SizedBox(height: 16),
const SizedBox(height: 24), TextField(
_isLoading controller: _pwController,
? const CircularProgressIndicator() obscureText: true,
: SizedBox( textInputAction: TextInputAction.done,
width: double.infinity, onSubmitted: (_) => _login(),
height: 55, decoration: const InputDecoration(
child: ElevatedButton( labelText: '비밀번호',
style: ElevatedButton.styleFrom( border: OutlineInputBorder(),
backgroundColor: Colors.indigo, prefixIcon: Icon(Icons.lock),
foregroundColor: Colors.white, ),
shape: RoundedRectangleBorder( ),
borderRadius: BorderRadius.circular(12), const SizedBox(height: 24),
_isLoading
? const CircularProgressIndicator()
: SizedBox(
width: double.infinity,
height: 55,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.indigo,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
), ),
), onPressed: _login,
onPressed: _login, child: const Text(
child: const Text( '로그인',
'로그인', style: TextStyle(
style: TextStyle( fontSize: 18,
fontSize: 18, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), ),
), ),
), ),
const SizedBox(height: 4),
TextButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const TeacherRegisterScreen(),
),
),
child: const Text(
'👨‍🏫 선생님이신가요? 교사 회원가입 하기',
style: TextStyle(
color: Colors.indigo,
fontWeight: FontWeight.bold,
), ),
const SizedBox(height: 4),
TextButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const TeacherRegisterScreen(),
), ),
), ),
child: const Text( const Divider(height: 40),
'👨‍🏫 선생님이신가요? 교사 회원가입 하기', Row(
style: TextStyle( mainAxisAlignment: MainAxisAlignment.spaceEvenly,
color: Colors.indigo, children: [
fontWeight: FontWeight.bold, TextButton.icon(
), icon: const Icon(
Icons.gavel,
size: 18,
color: Colors.grey,
),
label: const Text(
'교사 간편인증',
style: TextStyle(color: Colors.grey),
),
onPressed: () => _showLegacyPasswordDialog(
'선생님',
'1234',
const TeacherDashboard(),
),
),
TextButton.icon(
icon: const Icon(
Icons.settings,
size: 18,
color: Colors.grey,
),
label: const Text(
'관리자 간편인증',
style: TextStyle(color: Colors.grey),
),
onPressed: () => _showLegacyPasswordDialog(
'시스템 관리자',
'4936',
const AdminDashboard(),
),
),
],
), ),
), ],
const Divider(height: 40), ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
TextButton.icon(
icon: const Icon(Icons.gavel, size: 18, color: Colors.grey),
label: const Text(
'교사 간편인증',
style: TextStyle(color: Colors.grey),
),
onPressed: () => _showLegacyPasswordDialog(
'선생님',
'1234',
const TeacherDashboard(),
),
),
TextButton.icon(
icon: const Icon(
Icons.settings,
size: 18,
color: Colors.grey,
),
label: const Text(
'관리자 간편인증',
style: TextStyle(color: Colors.grey),
),
onPressed: () => _showLegacyPasswordDialog(
'시스템 관리자',
'4936',
const AdminDashboard(),
),
),
],
),
],
), ),
), ),
), ),