Skip to content

Commit

Permalink
✨feat : 로그인 버튼 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seochan99 committed Feb 14, 2024
1 parent 28ac1e8 commit 63db15f
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions lib/views/profile/profile_header_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,25 @@ class ProfileHeader extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 62, 20, 24),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// 유저 정보가 있으면 이메일을 보여주고, 없으면 로그인 버튼 보여줌
user != null
? Text("오늘도 이어립스 해볼까요, ${user!.email}")
: GestureDetector(
onTap: () => Get.to(() => LoginScreen()),
child: const Text(
"로그인 하러가기",
style: TextStyle(color: Colors.blue),
),
),
],
child: GestureDetector(
onTap: () => user != null ? null : Get.to(() => LoginScreen()),
child: Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 62, 20, 24),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// 유저 정보가 있으면 이메일을 보여주고, 없으면 로그인 버튼 보여줌
user != null
? Text("오늘도 이어립스 해볼까요, ${user!.email}")
: const Text(
"로그인 하러가기",
style: TextStyle(color: Colors.blue),
),
],
),
),
),
),
);
Expand Down

0 comments on commit 63db15f

Please sign in to comment.