117 lines
3.7 KiB
Dart
117 lines
3.7 KiB
Dart
![]() |
import 'package:flutter/material.dart';
|
||
|
import 'id_finding_page.dart';
|
||
|
import 'pw_finding_page.dart';
|
||
|
import 'signup_page.dart';
|
||
|
|
||
|
class LoginPage extends StatefulWidget {
|
||
|
const LoginPage({Key? key}) : super(key: key);
|
||
|
|
||
|
@override
|
||
|
_LoginPageState createState() => _LoginPageState();
|
||
|
}
|
||
|
|
||
|
class _LoginPageState extends State<LoginPage> {
|
||
|
bool _isChecked = false;
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Scaffold(
|
||
|
backgroundColor: Colors.white,
|
||
|
appBar: AppBar(
|
||
|
title: const Text('ALL SCORE', style: TextStyle(color: Colors.white)),
|
||
|
backgroundColor: Colors.black,
|
||
|
),
|
||
|
body: Padding(
|
||
|
padding: const EdgeInsets.all(16.0),
|
||
|
child: Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
const Text(
|
||
|
'로그인',
|
||
|
style: TextStyle(
|
||
|
fontSize: 24,
|
||
|
fontWeight: FontWeight.bold,
|
||
|
color: Colors.black,
|
||
|
),
|
||
|
),
|
||
|
const SizedBox(height: 32),
|
||
|
TextField(
|
||
|
decoration: InputDecoration(
|
||
|
labelText: 'ID',
|
||
|
labelStyle: const TextStyle(color: Colors.black),
|
||
|
border: OutlineInputBorder(),
|
||
|
focusedBorder: OutlineInputBorder(
|
||
|
borderSide: const BorderSide(color: Colors.black, width: 2.0),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
const SizedBox(height: 16),
|
||
|
TextField(
|
||
|
decoration: InputDecoration(
|
||
|
labelText: 'PW',
|
||
|
labelStyle: const TextStyle(color: Colors.black),
|
||
|
border: OutlineInputBorder(),
|
||
|
focusedBorder: OutlineInputBorder(
|
||
|
borderSide: const BorderSide(color: Colors.black, width: 2.0),
|
||
|
),
|
||
|
),
|
||
|
obscureText: true,
|
||
|
),
|
||
|
Row(
|
||
|
children: [
|
||
|
Checkbox(
|
||
|
value: _isChecked,
|
||
|
onChanged: (value) {
|
||
|
setState(() {
|
||
|
_isChecked = value ?? false;
|
||
|
});
|
||
|
},
|
||
|
),
|
||
|
const Text('자동로그인', style: TextStyle(color: Colors.black)),
|
||
|
],
|
||
|
),
|
||
|
const SizedBox(height: 16),
|
||
|
ElevatedButton(
|
||
|
onPressed: () {
|
||
|
// 로그인 로직 추가
|
||
|
},
|
||
|
style: ElevatedButton.styleFrom(
|
||
|
backgroundColor: Colors.black,
|
||
|
foregroundColor: Colors.white,
|
||
|
),
|
||
|
child: const Text('로그인'),
|
||
|
),
|
||
|
const SizedBox(height: 16),
|
||
|
TextButton(
|
||
|
onPressed: () {
|
||
|
Navigator.push(
|
||
|
context,
|
||
|
MaterialPageRoute(builder: (context) => const IdFindingPage()),
|
||
|
);
|
||
|
},
|
||
|
child: const Text('ID 찾기', style: TextStyle(color: Colors.black)),
|
||
|
),
|
||
|
TextButton(
|
||
|
onPressed: () {
|
||
|
Navigator.push(
|
||
|
context,
|
||
|
MaterialPageRoute(builder: (context) => const PwFindingPage()),
|
||
|
);
|
||
|
},
|
||
|
child: const Text('PW 찾기', style: TextStyle(color: Colors.black)),
|
||
|
),
|
||
|
TextButton(
|
||
|
onPressed: () {
|
||
|
Navigator.push(
|
||
|
context,
|
||
|
MaterialPageRoute(builder: (context) => const SignUpPage()),
|
||
|
);
|
||
|
},
|
||
|
child: const Text('회원가입', style: TextStyle(color: Colors.black)),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|