Skip to content

Commit

Permalink
[#1] Feat: 로그인 화면 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
cucumber99 committed Jun 29, 2024
1 parent e84f360 commit 9ab1754
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 197 deletions.
4 changes: 2 additions & 2 deletions lib/app_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:go_router/go_router.dart';

import 'screens/Home/home_screen.dart';
import 'screens/Login/login_screen.dart';
import 'screens/home/home_screen.dart';
import 'screens/login/login_screen.dart';
import 'providers/auth_provider.dart';

final _key = GlobalKey<NavigatorState>();
Expand Down
93 changes: 0 additions & 93 deletions lib/screen/Login/loginScreen.dart

This file was deleted.

93 changes: 0 additions & 93 deletions lib/screen/Login/login_screen.dart

This file was deleted.

88 changes: 83 additions & 5 deletions lib/screens/Login/login_screen.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,89 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';

class LoginScreen extends ConsumerWidget {
import '../../model/common/color.dart';

class LoginScreen extends StatefulWidget {
const LoginScreen({super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
return const Placeholder();
State<LoginScreen> createState() => _LoginScreenState();
}

class _LoginScreenState extends State<LoginScreen> {
late Size size;

@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {
size = MediaQuery.of(context).size;
});
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: WHITE,
body: Center(
child: Column(
children: [
SizedBox(
width: size.width * 1.2,
child: Image.asset('assets/images/logo.png'),
),
Column(
children: [
SizedBox(
width: size.height * 0.2,
child: const Text('Title',
style: TextStyle(fontSize: 100, color: BLACK)),
),
SizedBox(
width: size.height * 0.2,
child: const Text(' sub Title',
style: TextStyle(fontSize: 50, color: BLACK)),
),
ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(
padding: EdgeInsets.symmetric(
horizontal: size.width * 0.2,
vertical: size.width * 0.03,
),
backgroundColor: YELLOW,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
elevation: 0,
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset(
"assets/images/kakao.png",
width: 43,
height: 26,
),
const SizedBox(width: 8),
const Text(
'카카오톡으로 로그인',
style: TextStyle(
color: BLACK,
fontSize: 20,
fontFamily: 'Ink Free',
fontWeight: FontWeight.w400,
),
),
],
),
),
],
)
],
),
),
);
}
}
}
4 changes: 0 additions & 4 deletions lib/screens/login/login_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import '../../model/common/color.dart';
Expand All @@ -25,9 +24,6 @@ class _LoginScreenState extends State<LoginScreen> {

@override
Widget build(BuildContext context) {
if (size == null) {
return const SizedBox.shrink();
}
return Scaffold(
backgroundColor: WHITE,
body: Center(
Expand Down

0 comments on commit 9ab1754

Please sign in to comment.