From dca7912f8dfcf368a135712943b899e6869f590f Mon Sep 17 00:00:00 2001 From: sihoo Date: Wed, 5 Aug 2026 14:07:06 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EC=95=84=EC=9D=B4=EB=94=94/=EB=B9=84=EB=B0=80?= =?UTF-8?q?=EB=B2=88=ED=98=B8=20=EC=9E=85=EB=A0=A5=EC=B9=B8=20=ED=8F=AD=20?= =?UTF-8?q?=EC=A0=9C=ED=95=9C=20(=EB=8D=B0=EC=8A=A4=ED=81=AC=ED=86=B1=20?= =?UTF-8?q?=EC=9B=B9=EC=97=90=EC=84=9C=20=EB=84=88=EB=AC=B4=20=EB=84=93?= =?UTF-8?q?=EA=B2=8C=20=EB=8A=98=EC=96=B4=EC=A7=80=EB=8D=98=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/screens/login_screen.dart | 215 ++++++++++++++++++---------------- 1 file changed, 111 insertions(+), 104 deletions(-) diff --git a/lib/screens/login_screen.dart b/lib/screens/login_screen.dart index db5f43f..a4c9be4 100644 --- a/lib/screens/login_screen.dart +++ b/lib/screens/login_screen.dart @@ -421,121 +421,128 @@ class _LoginScreenState extends State { body: Center( child: SingleChildScrollView( padding: const EdgeInsets.all(24.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Icon(Icons.school, size: 80, color: Colors.indigo), - const SizedBox(height: 16), - const Text( - '백산고등학교 모니터', - style: TextStyle( - fontSize: 26, - fontWeight: FontWeight.bold, - color: Colors.indigo, + child: ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 420), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.school, size: 80, color: Colors.indigo), + const SizedBox(height: 16), + const Text( + '백산고등학교 모니터', + style: TextStyle( + fontSize: 26, + fontWeight: FontWeight.bold, + color: Colors.indigo, + ), ), - ), - const SizedBox(height: 8), - const Text( - '학생 편의 및 학교생활 도우미', - 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: 8), + const Text( + '학생 편의 및 학교생활 도우미', + style: TextStyle(color: Colors.grey, fontSize: 15), ), - ), - const SizedBox(height: 16), - TextField( - controller: _pwController, - obscureText: true, - textInputAction: TextInputAction.done, - onSubmitted: (_) => _login(), - decoration: const InputDecoration( - labelText: '비밀번호', - border: OutlineInputBorder(), - prefixIcon: Icon(Icons.lock), + const SizedBox(height: 40), + TextField( + controller: _idController, + textInputAction: TextInputAction.next, + decoration: const InputDecoration( + labelText: '학번 또는 교직원 번호', + border: OutlineInputBorder(), + prefixIcon: Icon(Icons.person), + ), ), - ), - 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), + const SizedBox(height: 16), + TextField( + controller: _pwController, + obscureText: true, + textInputAction: TextInputAction.done, + onSubmitted: (_) => _login(), + decoration: const InputDecoration( + labelText: '비밀번호', + border: OutlineInputBorder(), + prefixIcon: Icon(Icons.lock), + ), + ), + 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, - child: const Text( - '로그인', - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, + onPressed: _login, + child: const Text( + '로그인', + style: TextStyle( + fontSize: 18, + 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( - '👨‍🏫 선생님이신가요? 교사 회원가입 하기', - style: TextStyle( - color: Colors.indigo, - fontWeight: FontWeight.bold, - ), + 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(), + ), + ), + ], ), - ), - 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(), - ), - ), - ], - ), - ], + ], + ), ), ), ),