Skip to content

Commit

Permalink
Merge pull request #100 from TEAMMatchDev/fix/#69
Browse files Browse the repository at this point in the history
[ hot fix ] 실행 에러 수정 + 공유하기 링크 수정
  • Loading branch information
kimwest00 committed Nov 24, 2023
2 parents 754f99e + 15ac09b commit c9d94e3
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 129 deletions.
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Future<void> initService() async {

/// * GetStorage 초기화
await GetStorage.init();
await DynamicLink.setUp();
var reulst = await DynamicLink.setUp();
logger.e("dynamicc link initialized ; $reulst");

// 푸시 알림 설정 및 권한 요청
await requestPermission();
Expand Down
1 change: 0 additions & 1 deletion lib/modules/home/view/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:match/util/const/style/global_color.dart';
import 'package:match/util/const/style/global_text_styles.dart';
import '../../../provider/api/util/global_api_field.dart';
import '../../../util/components/global_widget.dart';
import '../../../util/const/style/global_logger.dart';
import '../../../util/const/style/global_skeleton.dart';
import '../controller/home_controller.dart';
import '../widget/home_widget.dart';
Expand Down
182 changes: 93 additions & 89 deletions lib/modules/review/widget/review_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,59 +11,64 @@ import '../../../util/const/style/global_text_styles.dart';

Widget ReviewModal({required PopupInfo popupInfo}) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(16.r)),
),
title: Text(
"'${popupInfo.title}'\n${popupInfo.regularStatus}이 집행 완료되었습니다🎉",
textAlign: TextAlign.center, style: AppTextStyles.T1Bold16),
titlePadding: EdgeInsets.symmetric(vertical: 40.h, horizontal: 30.w)
.copyWith(bottom: 0.h),
content: IntrinsicHeight(
child: Column(children: [
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(16.r)),
),
title: Text(
"'${popupInfo.title}'\n${popupInfo.regularStatus}이 집행 완료되었습니다🎉",
textAlign: TextAlign.center,
style: AppTextStyles.T1Bold16),
titlePadding: EdgeInsets.symmetric(vertical: 40.h, horizontal: 30.w)
.copyWith(bottom: 0.h),
content: IntrinsicHeight(
child: Column(
children: [
Text(
"MATCH와 함께 한 후원 마음에 드셨나요?",
style: AppTextStyles.S1SemiBold14.copyWith(color: AppColors.grey7),
textAlign: TextAlign.center,
),
SizedBox(
height: 27.h,
),
Container(
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
color: Colors.black,
"MATCH와 함께 한 후원 마음에 드셨나요?",
style: AppTextStyles.S1SemiBold14.copyWith(color: AppColors.grey7),
textAlign: TextAlign.center,
),
SizedBox(
height: 27.h,
),
Container(
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
color: Colors.black,
),
child: thumbsTextButton(
icon: "up",
text: "좋아요",
onTap: () async {
Get.back();
Get.toNamed(Routes.review,
arguments: {"executionId": popupInfo.executionId});
}),
),
child: thumbsTextButton(
icon: "up",
text: "좋아요",
SizedBox(
height: 14.h,
),
thumbsTextButton(
icon: "down",
text: "아니요",
color: AppColors.grey5,
onTap: () async {
Get.back();
Get.toNamed(Routes.review,
arguments: {"executionId": popupInfo.executionId});
}),
),
SizedBox(
height: 14.h,
),
thumbsTextButton(
icon: "down",
text: "아니요",
color: AppColors.grey5,
onTap: () async {
Get.back();
Get.toNamed(Routes.review,
arguments: {"executionId": popupInfo.executionId});
}),
)
])));
],
),
),
);
}

Widget thumbsTextButton({required String icon,
required String text,
Color color = Colors.white,
Future<void> Function()? onTap}) {
Widget thumbsTextButton(
{required String icon,
required String text,
Color color = Colors.white,
Future<void> Function()? onTap}) {
return GestureDetector(
onTap: () {
if (onTap != null) {
Expand Down Expand Up @@ -99,56 +104,55 @@ class RateWidget extends StatelessWidget {
final String subtitle;
final Rx<int> rate;

const RateWidget({super.key,
required this.title,
required this.subtitle,
required this.rate});
const RateWidget(
{super.key,
required this.title,
required this.subtitle,
required this.rate});

@override
Widget build(BuildContext context) {
return Obx(
() =>
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
title,
style: AppTextStyles.S1SemiBold14,
),
SizedBox(
height: 5.h,
),
Text(
subtitle,
style: AppTextStyles.L1Medium12.copyWith(
color: AppColors.grey7,
),
),
SizedBox(
height: 5.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List.generate(
5,
(index) =>
Container(
margin: EdgeInsets.only(right: 5.w),
child: GestureDetector(
onTap: () {
rate.value = index;
},
child: SvgPicture.asset(
"${iconDir}survey/ic_rate_${index}_30.svg",
color: rate.value == index
? AppColors.grey5
: AppColors.grey1,
),
),
)),
)
],
() => Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
title,
style: AppTextStyles.S1SemiBold14,
),
SizedBox(
height: 5.h,
),
Text(
subtitle,
style: AppTextStyles.L1Medium12.copyWith(
color: AppColors.grey7,
),
),
SizedBox(
height: 5.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List.generate(
5,
(index) => Container(
margin: EdgeInsets.only(right: 5.w),
child: GestureDetector(
onTap: () {
rate.value = index;
},
child: SvgPicture.asset(
"${iconDir}survey/ic_rate_${index}_30.svg",
color: rate.value == index
? AppColors.grey5
: AppColors.grey1,
),
),
)),
)
],
),
);
}
}
47 changes: 23 additions & 24 deletions lib/modules/tutorial/view/tutorial_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,31 @@ class TutorialScreen extends GetView<TutorialController> {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
for (var i = 0;
i < controller.projectTypes.length;
i++)
GestureDetector(
onTap: () {
controller.selectTypeIdx.value = i;
controller.selectProject =
controller.projectTypes[i].obs;
},
child: Padding(
padding: EdgeInsets.only(
right:
i != controller.projectTypes.length - 1
? 36.w
: 0),
child: categoryType(
type: projectTypeMap[controller
.projectTypes[i].projectKind] ??
ProjectType.CHILDREN,
isSelect:
(controller.selectTypeIdx.value == i).obs,
),
children: List.generate(
controller.projectTypes.length,
(index) => GestureDetector(
onTap: () {
controller.selectTypeIdx.value = index;
controller.selectProject =
controller.projectTypes[index].obs;
},
child: Padding(
padding: EdgeInsets.only(
right: index !=
controller.projectTypes.length - 1
? 36.w
: 0),
child: categoryType(
type: projectTypeMap[controller
.projectTypes[index].projectKind] ??
ProjectType.CHILDREN,
isSelect:
(controller.selectTypeIdx.value == index)
.obs,
),
),
],
),
),
),
controller.selectProject == null
? Padding(
Expand Down
4 changes: 2 additions & 2 deletions lib/provider/api/auth_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,6 @@ Future<void> saveToken(Map<String, dynamic> json) async {
GetStorageUtil.addToken(StorageKey.ACCESS_TOKEN, token.accessToken);
DioServices().setAccessToken(token.accessToken);
//튜토리얼 진행여부 저장
// AuthService.to.isTutorial.value = token.isTutorial;
AuthService.to.isTutorial.value = true;
AuthService.to.isTutorial.value = token.isTutorial;
// AuthService.to.isTutorial.value = true;
}
18 changes: 6 additions & 12 deletions lib/util/method/dynamic_link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class DynamicLink {
required int id,
}) async {
final dynamicLinkParams = DynamicLinkParameters(
link: Uri.parse("${dynamicBase}/$screenName?id=$id"),
link: Uri.parse("$dynamicBase/$screenName?id=$id"),
uriPrefix: dynamicBase,
androidParameters: const AndroidParameters(packageName: "com.dev.match"),
iosParameters: const IOSParameters(bundleId: "com.dev.match"),
Expand All @@ -59,17 +59,11 @@ class DynamicLink {
}

static void _redirectScreen(PendingDynamicLinkData dynamicLinkData) {
if (dynamicLinkData.link.queryParameters.containsKey('id')) {
if (dynamicLinkData.link.queryParameters.containsKey('id')) {
String link = dynamicLinkData.link.path.split('/').last;
int id = dynamicLinkData.link.queryParameters['id'] as int;

switch (link) {
case "project":
Get.offAllNamed(Routes.project, arguments: {"projectId": id});
break;
}
}
logger.e(dynamicLinkData);
String link = dynamicLinkData.link.path;
int id = int.parse(dynamicLinkData.link.queryParameters["id"] ?? "-1");
if (link.contains("project")) {
Get.toNamed(Routes.project, arguments: {"projectId": id});
}
}
}

0 comments on commit c9d94e3

Please sign in to comment.