Skip to content

Commit

Permalink
feat:#17 global button add + 불타는 매치 결제내역 페이지 작성 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwest00 committed Sep 26, 2023
1 parent c843cda commit c296c7b
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 26 deletions.
15 changes: 4 additions & 11 deletions lib/modules/buring_match/view/burning_match_detail_view.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:match/util/components/global_app_bar.dart';
import 'package:match/modules/buring_match/controller/burning_match_controller.dart';

import '../controller/burning_match_controller.dart';

class BurningMatchTotalScreen extends GetView<BurningMatchController> {
const BurningMatchTotalScreen({super.key});
class BurningMatchPayDetailScreen extends GetView<BurningMatchController> {
const BurningMatchPayDetailScreen({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CommonAppBar.basic("진행중인 매치"),
body: ListView(
children: [],
),
);
return const Placeholder();
}
}
40 changes: 40 additions & 0 deletions lib/modules/buring_match/view/burning_match_pay_view.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:match/util/components/global_app_bar.dart';

import '../../../util/const/style/global_color.dart';
import '../controller/burning_match_controller.dart';
import '../widget/burning_match_widget.dart';

class BurningMatchPayScreen extends GetView<BurningMatchController> {
const BurningMatchPayScreen({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CommonAppBar.basic("진행중인 매치"),
body: ListView.separated(
itemBuilder: ((context, index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 30.h),
child: BurningMatchCredit(
title: "불타는 매치",
date: "2021.09.01",
type: "불타는 매치",
day: 30,
price: 10000,
),
);
}),
separatorBuilder: ((context, index) {
return Container(
margin:
EdgeInsets.symmetric(vertical: 29.h).copyWith(bottom: 0.h),
color: AppColors.searchBackground,
height: 10.h,
);
}),
itemCount: 3));
}
}
12 changes: 0 additions & 12 deletions lib/modules/buring_match/view/burning_match_total_view.dart

This file was deleted.

30 changes: 29 additions & 1 deletion lib/modules/buring_match/widget/burning_match_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:match/util/components/global_widget.dart';
import 'package:match/util/const/global_variable.dart';
import 'package:match/util/const/style/global_text_styles.dart';

import '../../../util/components/global_button.dart';
import '../../../util/const/style/global_color.dart';

///<h2>불타는 진행중인 매치 목록 item </h2>
Expand All @@ -30,11 +31,15 @@ class BurningMatchCredit extends StatelessWidget {
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title, style: AppTextStyles.heading2Bold18),
SizedBox(
height: 7.h,
),
Text(date,
style: AppTextStyles.subtitle2Bold14
.copyWith(color: AppColors.grey6)),
Expand Down Expand Up @@ -68,7 +73,7 @@ class BurningMatchCredit extends StatelessWidget {
height: 20.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("후원 금액",
style: AppTextStyles.subtitle2Bold14
Expand All @@ -84,6 +89,29 @@ class BurningMatchCredit extends StatelessWidget {
SizedBox(
height: 20.h,
),
Row(
children: [
Expanded(
child: CommonButton(
text: "매치 기록",
onTap: () async {
//TODO: 매치 기록 페이지로 이동
},
),
),
SizedBox(
width: 12.w,
),
Expanded(
child: CommonButton(
text: "매치 해지",
onTap: () async {
//TODO: 매치 해지 로직 추가
},
),
),
],
)
],
);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/provider/routes/pages.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:match/modules/buring_match/binding/burning_match_binding.dart';
import 'package:match/modules/buring_match/view/burning_match_detail_view.dart';
import 'package:match/modules/buring_match/view/burning_match_pay_view.dart';
import 'package:match/modules/donate/binding/donate_binding.dart';
import 'package:match/modules/donate/view/donate_view.dart';
import 'package:match/modules/mypage/binding/mypage_binding.dart';
Expand Down Expand Up @@ -71,7 +71,7 @@ class Pages {
GetPage(
title: "불타는 매치 화면",
name: Routes.burning_match,
page: () => const BurningMatchTotalScreen(),
page: () => const BurningMatchPayScreen(),
transition: Transition.noTransition,
binding: BurningMatchBinding(),
curve: Curves.easeIn,
Expand Down
26 changes: 26 additions & 0 deletions lib/util/components/global_button.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:match/util/const/style/global_color.dart';

import '../const/style/global_text_styles.dart';

class CommonButton extends StatelessWidget {
final Future<void> Function() onTap;
final String text;
const CommonButton({super.key, required this.onTap, required this.text});

@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
padding: EdgeInsets.symmetric(vertical: 17.h),
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.white,
border: Border.all(color: AppColors.grey1),
borderRadius: BorderRadius.circular(10.r)),
child: Text(text, style: AppTextStyles.subtitle2Bold14),
));
}
}

0 comments on commit c296c7b

Please sign in to comment.