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

Create CustomRefreshIndicator - edited for upgrade #246

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

thomaskim1130
Copy link
Contributor

@thomaskim1130 thomaskim1130 commented Nov 14, 2024

Overview

로딩을 위해 pull down하는 거리 감소. 편의성 증진

Changes

  • refreshIndicator.adaptive()를 ScrollNotification 클래스를 활용해 custom화 함.
  • 기존 pull down 50(변경 불가) 에서 30으로 조정. (변경 가능)
  • main_page.dart, post_list_show_page.dart, user_page.dart, post_view_page 등 페이지에 적용

Implementaion Method

  • utils/refresh_indicator.dart를 추가하여 메소드 customRefreshIndicator 생성

After Changes

  • scrollDownLength를 customize할 수 있음
  • radius, color, 애니메이션 딜레이 등도 모두 customize 가능
  • refresh 함수를 호출하는 중 중복되지 않음

Related Issues

  • LoadingIndicator(화면 중앙)와 동시에 나타나는 현상이 발생하기도 함

Rollback Scenario

  1. customRefreshIndicator 대신 refreshIndicator.adaptive 사용
  2. AlwaysScrollablePhysics의 parent 변경하기

TODO

  • user_view_page.dart 에도 적용. (DONE)
  • refreshIndicator 다수 중복. Wrapper 함수 제작? (DONE)
  • DarkMode 적용

Created new CustomRefreshIndicator that:
- doesn't rely on any global keys
- thus doesn't cause state issues
- based on actual animation + NotificationListener
- can customize radius, pull down length, offset, etc.
- based on CupertinoActionIndicator
Applied customRefreshIndicator widget to :
mainPage
notificationPage
postListShowPage
postViewPage
userPage
userViewPage

(also modified physics for android)
added back asynchronous operation
@thomaskim1130 thomaskim1130 added the enhancement New feature or request label Nov 14, 2024
@thomaskim1130 thomaskim1130 added this to the v1.3.0 milestone Nov 14, 2024
@thomaskim1130 thomaskim1130 self-assigned this Nov 14, 2024
@thomaskim1130 thomaskim1130 linked an issue Nov 15, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] CustomRefreshIndicator 적용하기
1 participant