Skip to content

Commit

Permalink
feat: 내취향관리 작업
Browse files Browse the repository at this point in the history
  • Loading branch information
nain93 committed Aug 11, 2023
1 parent f93cce5 commit 6f9f901
Show file tree
Hide file tree
Showing 9 changed files with 490 additions and 462 deletions.
213 changes: 0 additions & 213 deletions lib/screens/edit_profile.dart

This file was deleted.

53 changes: 37 additions & 16 deletions lib/screens/home/widgets/content_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class ContentCard extends HookWidget {
const SizedBox(height: 10),
Text(
content.contentName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w700,
Expand All @@ -35,29 +37,48 @@ class ContentCard extends HookWidget {
const SizedBox(height: 2),
Text(
content.contentMemo ?? '',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 14,
fontFamily: FontConstants.pretendard,
color: AppColors.moaDescription,
),
),
SizedBox(height: content.contentMemo == null ? 0 : 15),
SizedBox(
width: double.infinity,
child: Wrap(
spacing: 10,
runSpacing: 10,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
...content.contentHashTags.map((tag) {
return HashtagButton(
onPress: () => onPressHashtag(tag.hashTag),
text: tag.hashTag,
);
}).toList(),
],
),
)
content.contentHashTags.length > 3
? SizedBox(
width: double.infinity,
child: Wrap(
spacing: 10,
runSpacing: 10,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
...content.contentHashTags.sublist(0, 3).map((tag) {
return HashtagButton(
onPress: () => onPressHashtag(tag.hashTag),
text: tag.hashTag,
);
}).toList()
],
),
)
: SizedBox(
width: double.infinity,
child: Wrap(
spacing: 10,
runSpacing: 10,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
...content.contentHashTags.map((tag) {
return HashtagButton(
onPress: () => onPressHashtag(tag.hashTag),
text: tag.hashTag,
);
}).toList()
],
),
)
],
),
);
Expand Down
47 changes: 24 additions & 23 deletions lib/screens/home/widgets/hashtag_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,43 @@ import 'package:moa_app/constants/color_constants.dart';
import 'package:moa_app/constants/font_constants.dart';

class HashtagButton extends StatelessWidget {
const HashtagButton({super.key, this.onPress, required this.text});
const HashtagButton({
super.key,
this.onPress,
required this.text,
this.width,
this.height,
this.style,
this.padding,
});
final Function()? onPress;
final String text;
final double? width;
final double? height;
final TextStyle? style;
final EdgeInsetsGeometry? padding;

@override
Widget build(BuildContext context) {
return Container(
height: 22,
width: width,
height: height,
decoration: BoxDecoration(
color: AppColors.moaSecondary,
borderRadius: BorderRadius.circular(50),
),
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 5),
padding:
padding ?? const EdgeInsets.symmetric(horizontal: 15, vertical: 5),
child: Text(
text,
style: const TextStyle(
color: AppColors.blackColor,
fontSize: 10,
fontWeight: FontWeight.w700,
fontFamily: FontConstants.pretendard,
),
style: style ??
const TextStyle(
color: AppColors.blackColor,
fontSize: 10,
fontWeight: FontWeight.w700,
fontFamily: FontConstants.pretendard,
),
),
);
// return Button(
// height: 22,
// onPress: onPress,
// text: text,
// textStyle: const TextStyle(
// color: AppColors.blackColor,
// fontSize: 10,
// fontWeight: FontWeight.w700,
// fontFamily: FontConstants.pretendard,
// ),
// padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 5),
// backgroundColor: AppColors.moaSecondary,
// borderRadius: 50,
// );
}
}
Loading

0 comments on commit 6f9f901

Please sign in to comment.