-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π λ©μΈ λ μ΄μμ λ° ν맀 νμ΄μ§ ν λ€λΉκ²μ΄μ μ€λ₯ μμ #15
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
import 'package:tuti/common/constraints_scaffold.dart'; | ||
|
||
import '../../../constants/gaps.dart'; | ||
|
@@ -15,12 +16,18 @@ class TuTiScreen extends StatelessWidget { | |
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const ConstraintsScaffold( | ||
child: Column( | ||
children: [ | ||
TuTiHeaderMobile(), | ||
Flexible(flex: 5, child: TuTiCardMobile()), | ||
], | ||
return ConstraintsScaffold( | ||
child: Container( | ||
margin: EdgeInsets.symmetric(horizontal: 20.w), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. νΈν° ν νλ©΄ λ μ΄μμ μ‘°μ μ μν΄ λ§μ§ μΆκ°. μ¦, ConstranitsScaffold μμ Containerμ widthλ₯Ό 700μΌλ‘ μ ννκ³ μκΈ° λλ¬Έμ μ΄ λΆλΆμμ λ μ΄μμμ μ‘°μ ν΄μΌ νΈν° νμ λ μ΄μμμ΄ μ‘°μ λ¨. |
||
child: const Column( | ||
children: [ | ||
TuTiHeaderMobile(), | ||
Flexible( | ||
flex: 5, | ||
child: TuTiCardMobile(), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
import 'package:go_router/go_router.dart'; | ||
import 'package:tuti/common/custom_token_manager.dart'; | ||
import 'package:tuti/common/service/navigation_index_provder.dart'; | ||
import 'package:tuti/common/service/token_provider.dart'; | ||
import 'package:tuti/constants/color.dart'; | ||
import 'package:tuti/constants/gaps.dart'; | ||
|
||
class TuTiBanner extends StatelessWidget { | ||
class TuTiBanner extends ConsumerWidget { | ||
const TuTiBanner( | ||
{super.key, | ||
required this.location, | ||
required this.onTap, | ||
required this.title, | ||
required this.subtitle}); | ||
|
||
final String location; | ||
final VoidCallback onTap; | ||
final String title; | ||
final String subtitle; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. λ°°λ ν΄λ¦ μ λ€λΉκ²μ΄μ λ‘μ§μ΄ ν΅μΌλμ§ μΌμ΄μ€ λ³λ‘ λ€λ₯΄λ―λ‘ onTapλ©μλλ₯Ό μμμμ μ λ¬νλλ‘ μ€μ . |
||
return GestureDetector( | ||
onTap: () { | ||
context.push(location); | ||
}, | ||
onTap: onTap, | ||
child: Container( | ||
margin: EdgeInsets.symmetric(horizontal: 10.w), | ||
padding: EdgeInsets.symmetric(horizontal: 13.w, vertical: 10.h), | ||
margin: EdgeInsets.symmetric(horizontal: 20.w), | ||
height: 80.h, | ||
decoration: ShapeDecoration( | ||
color: Colors.white, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
import 'package:go_router/go_router.dart'; | ||
import 'package:tuti/common/custom_token_manager.dart'; | ||
import 'package:tuti/common/service/navigation_index_provder.dart'; | ||
import 'package:tuti/common/tuti_icon.dart'; | ||
import 'package:tuti/features/profile/models/member_model.dart'; | ||
import 'package:tuti/features/tutis/views/personal_branding_screen.dart'; | ||
|
@@ -86,63 +87,58 @@ class _TuTiCardMobileState extends ConsumerState<TuTiCardMobile> { | |
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: EdgeInsets.symmetric(horizontal: 30.w), | ||
child: CustomScrollView( | ||
controller: _scrollController, | ||
slivers: [ | ||
SliverAppBar( | ||
expandedHeight: 80.h, | ||
floating: false, | ||
pinned: false, | ||
flexibleSpace: const FlexibleSpaceBar( | ||
background: TuTiBanner( | ||
location: PersonalBrandingScreen.routePath, | ||
title: '[곡μ§]\nνΈν° κ°μ λ°κ²¬ μ°κ΅¬μ 1κΈ° λͺ¨μ§ μ€!', | ||
subtitle: 'π€― μΈμ κ³ λ―Ό, μ§λ‘ κ³ λ―Ό ! λ―Έλμ λν νμ μ΄ λ€μ§ μμ λ!', | ||
), | ||
return CustomScrollView( | ||
controller: _scrollController, | ||
slivers: [ | ||
SliverAppBar( | ||
expandedHeight: 80.h, | ||
floating: false, | ||
pinned: false, | ||
flexibleSpace: FlexibleSpaceBar( | ||
background: TuTiBanner( | ||
onTap: () { | ||
// ν맀νμ΄μ§ νμΌλ‘ μ΄λ | ||
ref.read(navigationSelectedIndexProvider.notifier).state = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ν맀νμ΄μ§ νμΌλ‘ μ΄λνλ λ‘μ§ μΆκ° |
||
}, | ||
title: '[곡μ§]\nνΈν° κ°μ λ°κ²¬ μ°κ΅¬μ 1κΈ° λͺ¨μ§ μ€!', | ||
subtitle: 'π€― μΈμ κ³ λ―Ό, μ§λ‘ κ³ λ―Ό ! λ―Έλμ λν νμ μ΄ λ€μ§ μμ λ!', | ||
), | ||
), | ||
SliverGrid( | ||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( | ||
crossAxisCount: 2, | ||
), | ||
delegate: SliverChildBuilderDelegate(childCount: _allMembers.length, | ||
(context, index) { | ||
final member = _allMembers[index]; | ||
return Padding( | ||
padding: EdgeInsets.symmetric(horizontal: 10.w), | ||
child: Container( | ||
constraints: BoxConstraints( | ||
minHeight: 250.h, | ||
maxHeight: 250.h, | ||
), | ||
margin: EdgeInsets.symmetric(vertical: 20.w), | ||
decoration: ShapeDecoration( | ||
color: Colors.white, | ||
shape: RoundedRectangleBorder( | ||
side: const BorderSide( | ||
width: 2, | ||
color: ColorConstants.primaryColor, | ||
), | ||
borderRadius: BorderRadius.circular(45), | ||
), | ||
), | ||
child: Row( | ||
mainAxisSize: MainAxisSize.max, | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: [ | ||
_buildLeftColumn(context, member), | ||
Gaps.w24, | ||
_buildRightColumn(context, member), | ||
], | ||
), | ||
SliverGrid( | ||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( | ||
crossAxisCount: 2, | ||
), | ||
delegate: SliverChildBuilderDelegate(childCount: _allMembers.length, | ||
(context, index) { | ||
final member = _allMembers[index]; | ||
return Container( | ||
margin: EdgeInsets.symmetric(vertical: 20.w, horizontal: 8.w), | ||
decoration: ShapeDecoration( | ||
color: Colors.white, | ||
shape: RoundedRectangleBorder( | ||
side: const BorderSide( | ||
width: 2, | ||
color: ColorConstants.primaryColor, | ||
), | ||
borderRadius: BorderRadius.circular(45), | ||
), | ||
); | ||
}), | ||
) | ||
], | ||
), | ||
), | ||
child: Padding( | ||
padding: EdgeInsets.all(7.w), | ||
child: Row( | ||
mainAxisSize: MainAxisSize.max, | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: [ | ||
_buildLeftColumn(context, member), | ||
_buildRightColumn(context, member), | ||
], | ||
), | ||
), | ||
); | ||
}), | ||
) | ||
], | ||
); | ||
} | ||
|
||
|
@@ -175,9 +171,12 @@ class _TuTiCardMobileState extends ConsumerState<TuTiCardMobile> { | |
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
_buildSwitchRow(context, member), | ||
Gaps.h10, | ||
TuTiText.small( | ||
context, | ||
style: Theme.of(context) | ||
.textTheme | ||
.bodySmall! | ||
.copyWith(fontSize: 10.sp, fontWeight: FontWeight.w800), | ||
member.applyMatchingStatus == 'ON' ? 'λ§€μΉ κ°λ₯' : 'μ¬μ§ μ€', | ||
// member.applyMatchingStatus == 'ON' ? 'λ§€μΉ κ°λ₯' : member.matchingDescription.isNotEmpty ? member.matchingDescription : 'μ¬μ§ μ€', | ||
), | ||
|
@@ -204,21 +203,21 @@ class _TuTiCardMobileState extends ConsumerState<TuTiCardMobile> { | |
return Text('Error: ${snapshot.error}'); | ||
} | ||
} | ||
return const SizedBox(); | ||
return const SizedBox.shrink(); | ||
}, | ||
), | ||
Gaps.h12, | ||
Gaps.h6, | ||
TuTiText.small( | ||
context, | ||
member.university == '' | ||
? 'λ―Έμ λ ₯' | ||
: '${member.university} / ${member.major}', | ||
: '${member.university}\n${member.major}', | ||
maxLines: 2, | ||
overflow: TextOverflow.ellipsis, | ||
style: Theme.of(context) | ||
.textTheme | ||
.bodySmall! | ||
.copyWith(fontSize: 9.sp, fontWeight: FontWeight.w900), | ||
.copyWith(fontSize: 8.sp, fontWeight: FontWeight.w900), | ||
), | ||
], | ||
), | ||
|
@@ -233,6 +232,7 @@ class _TuTiCardMobileState extends ConsumerState<TuTiCardMobile> { | |
children: [ | ||
_buildKeywordsWrap(member), | ||
TuTiButton( | ||
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 20.w), | ||
title: 'λ보기', | ||
onPressed: () async { | ||
String? authToken = await CustomTokenManager.getToken(); | ||
|
@@ -247,9 +247,6 @@ class _TuTiCardMobileState extends ConsumerState<TuTiCardMobile> { | |
_getDetailProfile(member.memberId); | ||
} | ||
}, | ||
padding: EdgeInsets.symmetric( | ||
horizontal: 35.w, | ||
), | ||
fontSize: 10.sp, | ||
), | ||
Gaps.h16, | ||
|
@@ -325,8 +322,8 @@ class _TuTiCardMobileState extends ConsumerState<TuTiCardMobile> { | |
for (var job in jobTags) | ||
TuTiIcon( | ||
title: job, | ||
fontSize: 10.sp, | ||
iconHeight: 50.h, | ||
fontSize: 9.sp, | ||
iconHeight: 60.h, | ||
), | ||
], | ||
), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μΉ΄μΉ΄μ€ λ‘κ·ΈμΈ μ¬μ¬λ₯Ό μν΄ λΉλ‘κ·ΈμΈ μ μ κ° μ μ μ μ€λ΅λ° + tuti νμΌλ‘ μ΄λνλ λ‘μ§ μ κ±°