1. 이용 내역(History) 화면 구현 및 UI 개선

2. 이용 내역 리스트 및 기간별 필터링 기능 추가
3. 상세 보기(Bottom Sheet) 및 타임라인 UI 적용
4. 전체 페이지 컬러 변경 등 디자인 개선
This commit is contained in:
KIMGYEONGRAN
2025-11-27 14:54:41 +09:00
parent 32daaad975
commit c1d8fc597d
4 changed files with 653 additions and 22 deletions

106
lib/login_screen.dart Normal file
View File

@@ -0,0 +1,106 @@
import 'package:flutter/material.dart';
import 'main.dart';
class LoginScreen extends StatelessWidget {
final TextEditingController _idController = TextEditingController();
final TextEditingController _pwController = TextEditingController();
LoginScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFF1E1E1E),
body: Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Icon(Icons.polymer, size: 80, color: Colors.white),
const SizedBox(height: 20),
const Text(
'METAQLAB'
'',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
letterSpacing: 1.2,
),
),
const SizedBox(height: 60),
_buildTextField('User ID', Icons.person, controller: _idController),
const SizedBox(height: 16),
_buildTextField('Password', Icons.lock, isObscure: true, controller: _pwController),
const SizedBox(height: 40),
ElevatedButton(
onPressed: () {
String inputId = _idController.text;
String inputPw = _pwController.text;
if (inputId == 'user' && inputPw == '1234') {
print('로그인 성공!');
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => const HomeScreen()),
);
} else {
print('로그인 실패');
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('아이디 또는 비밀번호가 틀렸습니다.'),
backgroundColor: Colors.redAccent,
duration: Duration(seconds: 2),
),
);
}
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
foregroundColor: Colors.black,
padding: const EdgeInsets.symmetric(vertical: 16),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
child: const Text(
'LOGIN',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
),
const SizedBox(height: 20),
TextButton(
onPressed: () {},
child: const Text('Forgot Password?', style: TextStyle(color: Colors.grey)),
),
],
),
),
);
}
Widget _buildTextField(String hint, IconData icon, {bool isObscure = false, required TextEditingController controller}) {
return TextField(
controller: controller,
obscureText: isObscure,
style: const TextStyle(color: Colors.white),
decoration: InputDecoration(
prefixIcon: Icon(icon, color: Colors.grey),
hintText: hint,
hintStyle: const TextStyle(color: Colors.grey),
filled: true,
fillColor: const Color(0xFF2C2C2E),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide.none,
),
),
);
}
}