Skip to content

Commit

Permalink
feat : MyPageFunctionList 제작
Browse files Browse the repository at this point in the history
lib/widgets/my_page_function_list.dart

issues : #20
  • Loading branch information
huchujj committed Aug 13, 2024
1 parent 93bc8b2 commit aed764e
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:frontend/pages/home_page.dart';
import 'package:frontend/pages/search_page.dart';

import 'package:frontend/pages/my_page.dart';

void main() {
Expand Down
5 changes: 5 additions & 0 deletions frontend/lib/pages/my_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:frontend/colors/app_colors.dart';
import 'package:frontend/widgets/custom_bottom_navigation_bar.dart';
import 'package:frontend/widgets/my_app_bar.dart';
import 'package:frontend/widgets/bookmark_list_togle.dart';
import 'package:frontend/widgets/my_page_function_list.dart';

class MyPage extends StatefulWidget {
const MyPage({super.key});
Expand All @@ -26,6 +27,10 @@ class _MyPageState extends State<MyPage> {
child: Column(
children: [
BookmarkListTogle(),
SizedBox(
height: 10,
),
MyPageFunctionList(),
],
),
),
Expand Down
64 changes: 64 additions & 0 deletions frontend/lib/widgets/my_page_function_list.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import 'package:flutter/material.dart';

class MyPageFunctionList extends StatelessWidget {
const MyPageFunctionList({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Container(
decoration: const BoxDecoration(
border: Border(
top: BorderSide(color: Colors.orange, width: 2.0), // 위쪽 실선
bottom: BorderSide(color: Colors.orange, width: 2.0), // 아래쪽 실선
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_buildSettingsItem("포즈 정렬 수정"),
_buildDottedDivider(),
_buildSettingsItem("환경설정"),
],
),
);
}

Widget _buildSettingsItem(String title) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
title,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
const Icon(
Icons.arrow_drop_down,
color: Colors.orange,
size: 24.0, // 더 큰 아이콘 크기
),
],
),
);
}

Widget _buildDottedDivider() {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
child: Row(
children: List.generate(
150 ~/ 5,
(index) => Expanded(
child: Container(
color: index % 2 == 0 ? Colors.transparent : Colors.orange,
height: 1,
),
)),
),
);
}
}

0 comments on commit aed764e

Please sign in to comment.