Skip to content

Commit fcf586e

Browse files
committed
[#1] 로그인 화면 구성 및 파일 구조 세팅
1 parent db361a7 commit fcf586e

6 files changed

Lines changed: 71 additions & 62 deletions

File tree

lib/app/cherrypic_app.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:cherrypic/presentation/screens/login/login_screen.dart';
3+
import 'package:cherrypic/core/constants/font.dart';
4+
5+
class CherrypicApp extends StatelessWidget {
6+
const CherrypicApp({super.key});
7+
8+
@override
9+
Widget build(BuildContext context) {
10+
return MaterialApp(
11+
title: 'Cherrypic',
12+
theme: ThemeData(
13+
fontFamily: AppFont.family,
14+
scaffoldBackgroundColor: Colors.white,
15+
useMaterial3: true,
16+
),
17+
home: const LoginScreen(),
18+
);
19+
}
20+
}

lib/main.dart

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,6 @@
11
import 'package:flutter/material.dart';
2+
import 'app/cherrypic_app.dart';
23

34
void main() {
4-
runApp(const MyApp());
5-
}
6-
7-
class MyApp extends StatelessWidget {
8-
const MyApp({super.key});
9-
10-
@override
11-
Widget build(BuildContext context) {
12-
return MaterialApp(
13-
title: 'Cherrypic App',
14-
theme: ThemeData(
15-
primarySwatch: Colors.pink,
16-
),
17-
home: const MyHomePage(),
18-
);
19-
}
20-
}
21-
22-
class MyHomePage extends StatefulWidget {
23-
const MyHomePage({super.key});
24-
25-
@override
26-
State<MyHomePage> createState() => _MyHomePageState();
27-
}
28-
29-
class _MyHomePageState extends State<MyHomePage> {
30-
int _counter = 0;
31-
32-
void _incrementCounter() {
33-
setState(() {
34-
_counter++;
35-
});
36-
}
37-
38-
@override
39-
Widget build(BuildContext context) {
40-
return Scaffold(
41-
appBar: AppBar(
42-
title: const Text('Cherrypic'),
43-
),
44-
body: Center(
45-
child: Column(
46-
mainAxisAlignment: MainAxisAlignment.center,
47-
children: <Widget>[
48-
const Text(
49-
'You have pushed the button this many times:',
50-
),
51-
Text(
52-
'$_counter',
53-
style: Theme.of(context).textTheme.headlineMedium,
54-
),
55-
],
56-
),
57-
),
58-
floatingActionButton: FloatingActionButton(
59-
onPressed: _incrementCounter,
60-
tooltip: 'Increment',
61-
child: const Icon(Icons.add),
62-
),
63-
);
64-
}
5+
runApp(const CherrypicApp());
656
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:cherrypic/core/constants/color.dart';
3+
import 'package:cherrypic/core/constants/font.dart';
4+
5+
class LoginScreen extends StatelessWidget {
6+
const LoginScreen({super.key});
7+
8+
@override
9+
Widget build(BuildContext context) {
10+
return Scaffold(
11+
backgroundColor: AppColor.mainLightRed,
12+
body: SafeArea(
13+
child: Column(
14+
mainAxisAlignment: MainAxisAlignment.center,
15+
children: [
16+
const Spacer(),
17+
Image.asset(
18+
'assets/images/CherryPic_logo.png',
19+
width: 80,
20+
),
21+
const SizedBox(height: 20),
22+
Image.asset(
23+
'assets/images/CherryPic_title.png',
24+
width: 140,
25+
),
26+
const SizedBox(height: 160),
27+
Text(
28+
'로그인 / 회원가입',
29+
style: AppFont.size14.copyWith(
30+
color: AppColor.mainRed,
31+
),
32+
),
33+
const SizedBox(height: 16),
34+
Row(
35+
mainAxisAlignment: MainAxisAlignment.center,
36+
children: [
37+
Image.asset('assets/images/kakao_icon.png', width: 70),
38+
const SizedBox(width: 10),
39+
Image.asset('assets/images/apple_icon.png', width: 70),
40+
],
41+
),
42+
const Spacer(),
43+
],
44+
),
45+
),
46+
);
47+
}
48+
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ flutter:
3737
fonts:
3838
- family: Koulen
3939
fonts:
40-
- asset: assets/fonts/Koulen/Koulen-Regular.ttf
40+
- asset: assets/fonts/Koulen-Regular.ttf

0 commit comments

Comments
 (0)