Skip to content
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-119 개인전 픽셀 표시하는 화면 만들기 #12

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

qjvk2880
Copy link
Contributor

작업 내용*

  • 개인전 픽셀 표시 구현 완료

고민한 내용*

  • 구글맵의 Polygon 자료형을 상속하는 Pixel 클래스를 만들어 활용함
  • _updateIndividaulPixel()에 Future와 await을 사용하지 않으면 지도 초기화 몇 초 뒤에 픽셀이 나타나는 문제가 발생함.
  • 시간을 측정해보니 네트워크 통신, 리스트 연산 등은 빠르게 이루어짐.
  • 픽셀이 받아와 진 후 gps 수신이 이루어질 때 마커의 이동하고 같이 렌더링되어서 지연이 있었던 것 같음.
  • await, Future를 사용하니 바로 렌더링 됨
  • 기술적 고민

리뷰 요구사항

  • 픽셀 그리는 로직이 매끄러운지 봐주시면 감사하겠습니다
  • 확장성을 고려한 설계를 하고 싶었는데 함수를 더 분리하면 좋을지 조언 부탁드립니다.

스크린샷

@qjvk2880 qjvk2880 self-assigned this Jun 28, 2024
Timer.periodic(const Duration(seconds: 30), (timer) {
_updateIndividualPixel();
});
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

30초 단위로 호출하면 성능이 괜찮겠죠? 걸음수도 동기화 해야되서 뭔가 walkingService 랑도 같이 쓸수도 있을 것 같네요

strokeColor: (pixel.userId == defaultUserId) ? Colors.blue : Colors.red,
strokeWidth: 1,
),
].obs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pixels.signAll([]) 로도 구현할 수 있습니다~

@koomin1227 koomin1227 merged commit 20e8c5b into develop Jun 28, 2024
1 check passed
@koomin1227 koomin1227 deleted the feature/M3-119-renderIndividualPixel branch June 28, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants