-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M3-154 마이페이지 걸음수 Ui만들기 #22
Conversation
c9c4a7b
to
64dc00b
Compare
lib/service/user_service.dart
Outdated
|
||
Future<UserPixelLog> getUserPixelLog() async { | ||
var response = await dio.get( | ||
'/count', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api url "/count" 맞나요?? api 명세서 상에는 "/api/pixels/count"로 되어있습니다!
lib/models/user_pixel_log.dart
Outdated
@@ -0,0 +1,14 @@ | |||
class UserPixelLog { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pixel 들의 카운드를 담는 모델인데 UserPixelCount
는 어떨까요?
@@ -17,8 +19,14 @@ class MyPageScreen extends StatelessWidget { | |||
child: Column( | |||
children: [ | |||
UserInfo(), | |||
const Text('마이페이지'), | |||
Obx(() => Text(walkController.getCurrentStep())), | |||
Container( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
단순히 공간을 띄우시려고 쓴거 같은데 Container 대신 SIzedBox 도 고려 해볼 수 있을 것 같아요!
lib/service/user_service.dart
Outdated
@@ -18,4 +19,12 @@ class UserService { | |||
var response = await dio.get('/users/$userId'); | |||
return User.fromJson(response.data['data']); | |||
} | |||
|
|||
Future<UserPixelLog> getUserPixelLog() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
마찬가지로 getUserPixelCount 가 어떨까요?
lib/widgets/my_page/user_info.dart
Outdated
@@ -46,10 +46,10 @@ class UserInfo extends StatelessWidget { | |||
crossAxisAlignment: CrossAxisAlignment.start, | |||
children: [ | |||
Text( | |||
myPageController.getCurrentUserNickname(), | |||
'그룹명',// myPageController.getCurrentUserNickname(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 왜 고정값으로 바뀌었나요?
컨트롤러에서 값을 가져오는 것으로 다시 수정하셔야 마이페이지에서 내 정보가 나올거 같네요~
lib/widgets/my_page/user_info.dart
Outdated
style: TextStyle(fontSize: 25), | ||
), | ||
Text(myPageController.getCurrentUserCommunityName(), | ||
Text('닉네임',//myPageController.getCurrentUserCommunityName(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위랑 똑같습니다
lib/widgets/my_page/step_window.dart
Outdated
Container( | ||
width: 120, | ||
height: 130, | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: BorderRadius.circular(10), | ||
), | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Text('현재 픽셀수'), | ||
Image.asset( | ||
'assets/currentTile.png', | ||
width: 80, | ||
height: 80, | ||
), | ||
Obx( | ||
() => Text( | ||
myPageController.getCurrentUserPixel().toString(), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
Container( | ||
width: 120, | ||
height: 130, | ||
decoration: BoxDecoration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
보니까 비슷한 형식이 반복되는 것 같습니다.
Container(
width: 120,
height: 130,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('현재 픽셀수'),
Image.asset(
'assets/currentTile.png',
width: 80,
height: 80,
),
Obx(
() => Text(
myPageController.getCurrentUserPixel().toString(),
),
),
],
),
),
이부분을 공통 위젯으로 분리하고 생성할때 다른 이미지와 값을 받게하면 코드 중복을 개선할 수 있을 것 같아요
lib/widgets/my_page/step_window.dart
Outdated
import '../../controllers/my_page_controller.dart'; | ||
import '../../controllers/walking_controller.dart'; | ||
|
||
class StepWindow extends StatelessWidget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StepWindow 라는 이름을 잘 모르겠습니다.
현재 픽셀수, 누적 픽셀수, 현재 걸음수 에 대한 정보를 나타내는 이름이 더 좋지 않을까요?
지금은 Step 만 강조되어있는 것 같아요
64dc00b
to
ccd3a87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰가 잘 반영된것 같습니다~
작업 내용*
고민한 내용*
리뷰 요구사항
스크린샷
|