Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
18dd3e8
#162 프로필 색상 수정 아이콘 크기 확대
Anzinius Aug 10, 2025
5f477d2
#162 토론방 채팅 입력 필드 내부 패딩 수정
Anzinius Aug 10, 2025
5558f38
#162 `프로필 수정` 폰트 수정
Anzinius Aug 10, 2025
336e638
#162 로그아웃, 회원탈퇴 아이콘 비율 수정
Anzinius Aug 10, 2025
22bde11
Revert "#162 로그아웃, 회원탈퇴 아이콘 비율 수정"
Anzinius Aug 10, 2025
a1fdb3b
#162 로그아웃, 회원탈퇴 아이콘 비율 수정
Anzinius Aug 10, 2025
7c90dc4
#162 동의한 이용약관 조회 API 추가
Anzinius Aug 13, 2025
a7c91b0
#162 동의한 이용약관 API 호출할 뷰모델 작성
Anzinius Aug 13, 2025
4dafa4f
#162 동의한 이용약관 날짜 표기되도록 UI 수정
Anzinius Aug 13, 2025
f18186a
#162 뒤로가기 버튼 수정
Anzinius Aug 13, 2025
cf51437
#162 이용약관 동의 일자 확인 페이지 추가
Anzinius Aug 21, 2025
0a95024
#162 추가 페이지 라우팅 설정
Anzinius Aug 21, 2025
fe71528
#162 커뮤니티 이용가이드 영역 삭제
Anzinius Aug 21, 2025
d73fc02
#162 커뮤니티 이용가이드 영역 삭제
Anzinius Aug 21, 2025
21d96d4
#162 코드 정리
Anzinius Aug 21, 2025
d04101c
#162 API 35 업데이트
Anzinius Aug 21, 2025
6a6909d
#162 빌드버전 업데이트
Anzinius Aug 21, 2025
64c88bd
Merge branch 'develop' into feat/162-profile-qa
Anzinius Aug 21, 2025
95a0fe0
#162 채팅방 입력필드 에러 수정
Anzinius Aug 21, 2025
306bb5a
#162 회원가입 403 에러 해결
Anzinius Aug 29, 2025
4fedd34
#162 참여중인 토론이 없는 경우, 표출되는 텍스트 수정
Anzinius Aug 29, 2025
c28df1e
#162 빌드버전 1.1.1(34), 앱 설명 변경
Anzinius Aug 29, 2025
44cd36e
#162 타겟SDK 35 명시
Anzinius Aug 31, 2025
41700e3
#162 빌드버전 1.1.1(35)
Anzinius Aug 31, 2025
4adde80
#162 postProfiles API에서 빈 문자열 보내는 에러 수정
Anzinius Sep 8, 2025
5c4d83d
#162 빌드버전 1.1.1(36)
Anzinius Sep 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (keystorePropertiesFile.exists()) {

android {
namespace = "com.rosyocean.debateseason"
compileSdk = flutter.compileSdkVersion
compileSdk = 35
ndkVersion = "25.1.8937393"

compileOptions {
Expand All @@ -31,7 +31,7 @@ android {
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 23
targetSdk = 34
targetSdk = 35
versionCode = flutter.versionCode
versionName = flutter.versionName
}
Expand Down
4 changes: 2 additions & 2 deletions assets/icons/ic_back_grey50.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions lib/core/routers/get_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import 'package:debateseason_frontend_v1/features/profile/bindings/terms_binding
import 'package:debateseason_frontend_v1/features/profile/presentation/views/profile_image_screen.dart';
import 'package:debateseason_frontend_v1/features/profile/presentation/views/profile_input_screen.dart';
import 'package:debateseason_frontend_v1/features/profile/presentation/views/profile_screen.dart';
import 'package:debateseason_frontend_v1/features/profile/presentation/views/profile_terms_page.dart';
import 'package:debateseason_frontend_v1/features/profile/presentation/views/profile_withdraw_screen.dart';
import 'package:debateseason_frontend_v1/features/profile/presentation/views/terms_screen.dart';
import 'package:debateseason_frontend_v1/features/splash/presentation/splash_screen.dart';
Expand Down Expand Up @@ -112,6 +113,11 @@ class GetRouter {
name: GetRouterName.lives,
page: () => LiveAllPage(),
binding: MediaBinding(),
),
GetPage(
name: GetRouterName.profileTerms,
page: () => ProfileTermsPage(),
binding: ProfileBinding(),
)
];
}
1 change: 1 addition & 0 deletions lib/core/routers/get_router_name.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ class GetRouterName {
static const String profileImage = '/profile_image';
static const String profileWithdraw = '/profile_withdraw';
static const String terms = '/terms';
static const String profileTerms = '/profile_terms';
}
6 changes: 4 additions & 2 deletions lib/features/chat/presentation/widgets/chat_input_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class _ChatInputFieldState extends State<ChatInputField> {
// onPressed: () {},
// ),
// ),
DeGaps.h12,
DeGaps.h20,
Expanded(
child: DeTextField(
controller: _textController,
Expand All @@ -75,6 +75,7 @@ class _ChatInputFieldState extends State<ChatInputField> {
border: InputBorder.none,
hintText: ChatConstants.chatInputHintText,
),
isCleanIcon: false,
),
),
DeGaps.h12,
Expand All @@ -86,7 +87,8 @@ class _ChatInputFieldState extends State<ChatInputField> {
_textController.clear();
},
child: Container(
padding: DeDimensions.all12,
margin: DeDimensions.all2,
padding: EdgeInsets.fromLTRB(14, 12, 10, 12),
decoration: BoxDecoration(
color: _textController.text.isEmpty
? DeColors.grey90
Expand Down
8 changes: 5 additions & 3 deletions lib/features/home/presentation/views/home_recommend_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,11 @@ class HomeRecommendPage extends GetView<RecommendViewModel> {
final mydebates = mydebateData.chatRoomResponse;
final int len = mydebates?.length ?? 0;
if (len == 0) {
return DeText(
'참여 중인 토론이 없습니다. 지금 바로 토론에 참여해보세요.',
style: DeFonts.body16Sb.copyWith(color: DeColors.grey10),
return Center(
child: DeText(
'참여 중인 토론이 없습니다. \n지금 바로 토론에 참여해보세요.',
style: DeFonts.body16Sb.copyWith(color: DeColors.grey10),
),
);
}
return Padding(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:debateseason_frontend_v1/features/profile/data/models/request/profile_image_req.dart';
import 'package:debateseason_frontend_v1/features/profile/data/models/request/profile_req.dart';
import 'package:debateseason_frontend_v1/features/profile/data/models/response/profile_res.dart';
import 'package:debateseason_frontend_v1/features/profile/data/models/response/terms_my_agree_res.dart';
import 'package:debateseason_frontend_v1/utils/base/base_res.dart';
import 'package:debateseason_frontend_v1/utils/base/nullable_base_res.dart';
import 'package:dio/dio.dart';
Expand All @@ -14,12 +14,12 @@ abstract class ProfileDataSource {

@POST('/api/v1/profiles')
Future<NullableBaseRes> postProfiles({
@Body() required ProfileReq body,
@Body() required Map<String, dynamic> body,
});

@PATCH('/api/v1/profiles')
Future<NullableBaseRes> patchProfiles({
@Body() required ProfileReq body,
@Body() required Map<String, dynamic> body,
});

@GET('/api/v1/profiles/me')
Expand All @@ -29,4 +29,7 @@ abstract class ProfileDataSource {
Future<NullableBaseRes> patchProfilesImage({
@Body() required ProfileImageReq body,
});

@GET('/api/v1/terms/agree')
Future<BaseRes<List<TermsMyAgreeRes>>> getTermsAgree();
}
48 changes: 44 additions & 4 deletions lib/features/profile/data/data_sources/profile_data_source.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 26 additions & 8 deletions lib/features/profile/data/models/request/profile_req.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,45 @@ class ProfileReq {
int communityId;
String gender;
String ageRange;
String residenceProvince;
String residenceDistrict;
String hometownProvince;
String hometownDistrict;
String? residenceProvince;
String? residenceDistrict;
String? hometownProvince;
String? hometownDistrict;

ProfileReq({
required this.nickname,
required this.communityId,
required this.gender,
required this.ageRange,
required this.residenceProvince,
required this.residenceDistrict,
required this.hometownProvince,
required this.hometownDistrict,
this.residenceProvince,
this.residenceDistrict,
this.hometownProvince,
this.hometownDistrict,
});

factory ProfileReq.fromJson(Map<String, dynamic> json) =>
_$ProfileReqFromJson(json);

Map<String, dynamic> toJson() => _$ProfileReqToJson(this);

/// POST /profiles - only sends required parameters (excludes nulls and empty strings)
Map<String, dynamic> toJsonForPost() {
final json = _$ProfileReqToJson(this);
json.removeWhere((key, value) => value == null || value == '');
return json;
}

/// PATCH /profiles - sends all parameters with empty strings instead of nulls
Map<String, dynamic> toJsonForPatch() {
final json = _$ProfileReqToJson(this);
json.forEach((key, value) {
if (value == null) {
json[key] = '';
}
});
return json;
}

factory ProfileReq.fromEntity(entity) => ProfileReq(
nickname: entity.nickname,
communityId: entity.community.id,
Expand Down
8 changes: 4 additions & 4 deletions lib/features/profile/data/models/request/profile_req.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions lib/features/profile/data/models/response/terms_my_agree_res.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import 'package:debateseason_frontend_v1/features/profile/domain/entities/terms_my_agree_entity.dart';
import 'package:json_annotation/json_annotation.dart';

part 'terms_my_agree_res.g.dart';

@JsonSerializable()
class TermsMyAgreeRes {
String termsType;
String agreedAt;
String notionUrl;

TermsMyAgreeRes({
required this.termsType,
required this.agreedAt,
required this.notionUrl,
});

factory TermsMyAgreeRes.fromJson(Map<String, dynamic> json) =>
_$TermsMyAgreeResFromJson(json);

Map<String, dynamic> toJson() => _$TermsMyAgreeResToJson(this);

TermsMyAgreeEntity toEntity(TermsMyAgreeRes res) => TermsMyAgreeEntity(
termsType: res.termsType,
agreedAt: res.agreedAt,
notionUrl: res.notionUrl,
);

static List<TermsMyAgreeRes> fromJsonList(List<dynamic> jsonList) {
return jsonList
.map((json) => TermsMyAgreeRes.fromJson(json as Map<String, dynamic>))
.toList();
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:debateseason_frontend_v1/features/profile/data/data_sources/prof
import 'package:debateseason_frontend_v1/features/profile/data/models/request/profile_image_req.dart';
import 'package:debateseason_frontend_v1/features/profile/data/models/request/profile_req.dart';
import 'package:debateseason_frontend_v1/features/profile/domain/entities/profile_entity.dart';
import 'package:debateseason_frontend_v1/features/profile/domain/entities/terms_my_agree_entity.dart';
import 'package:debateseason_frontend_v1/features/profile/domain/repositories/profile_repository.dart';
import 'package:debateseason_frontend_v1/utils/base/ui_state.dart';

Expand Down Expand Up @@ -36,8 +37,9 @@ class ProfileRepositoryImpl implements ProfileRepository {
Future<UiState<void>> postProfile({
required ProfileEntity entity,
}) async {
final profileReq = ProfileReq.fromEntity(entity);
final response = await dataSource.postProfiles(
body: ProfileReq.fromEntity(entity),
body: profileReq.toJsonForPost(), // Only sends required parameters
);

switch (response.status) {
Expand All @@ -61,8 +63,10 @@ class ProfileRepositoryImpl implements ProfileRepository {

@override
Future<UiState<void>> patchProfile({required ProfileEntity entity}) async {
final profileReq = ProfileReq.fromEntity(entity);
final response = await dataSource.patchProfiles(
body: ProfileReq.fromEntity(entity),
body: profileReq
.toJsonForPatch(), // Send all parameters with empty strings for nulls
);

switch (response.status) {
Expand Down Expand Up @@ -93,7 +97,6 @@ class ProfileRepositoryImpl implements ProfileRepository {

switch (response.status) {
case 200 || 201:

return (UiState.success(null));
default:
if (response.message.isEmpty) {
Expand All @@ -103,4 +106,20 @@ class ProfileRepositoryImpl implements ProfileRepository {
return (UiState.failure(response.message));
}
}

@override
Future<UiState<List<TermsMyAgreeEntity>>> getTermsAgree() async {
final response = await dataSource.getTermsAgree();

switch (response.status) {
case 200:
return UiState.success(
response.data.map((e) => e.toEntity(e)).toList());
default:
if (response.message.isEmpty) {
UiState.failure('데이터 불러오기 실패');
}
}
return UiState.failure(response.message);
}
}
12 changes: 12 additions & 0 deletions lib/features/profile/domain/entities/terms_my_agree_entity.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:freezed_annotation/freezed_annotation.dart';

part 'terms_my_agree_entity.freezed.dart';

@freezed
class TermsMyAgreeEntity with _$TermsMyAgreeEntity {
factory TermsMyAgreeEntity({
required String termsType,
required String agreedAt,
required String notionUrl,
}) = _TermsMyAgreeEntity;
}
Loading