패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.4.0+2

visibility_detector

자식의 가시성을 감지하고 콜백을 알리는 위젯입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
15.9만
좋아요
1.3천
Pub 점수
140

패키지 설치

flutter pub add visibility_detector

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

visibility_detector 패키지는 자식 위젯이 화면에 보이는지 모니터링하는 위젯을 제공합니다. 자식이 뷰포트에 진입하거나 탈출할 때 콜백을 트리거하여 효율적인 렌더링과 성능 최적화를 가능하게 합니다. 지연 로딩 콘텐츠, 애니메이션 또는 특정 UI 요소에 대한 사용자 참여 추적에 이상적입니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원하여 크로스플랫폼 애플리케이션에 매우 유연하게 활용할 수 있습니다.

사용 사례

  • 지연 로딩 이미지 또는 목록
  • 콘텐츠에 대한 사용자 참여도 추적
  • 가시성에 따라 애니메이션 최적화
  • 화면 밖 위젯의 자원 사용량 줄이기
  • 가시성 검사와 함께 무한 스크롤 구현

주요 기능

  • 실시간 가시성 감지
  • 크로스 플랫폼 호환성
  • 사용자 지정 가능한 가시성 기준
  • 가시성 변경 콜백
  • 경량이고 효율적

적합한 대상

  • 앱 성능 최적화하는 개발자
  • 큰 스크롤 가능한 목록을 가진 앱
  • 가시성 피드백이 필요한 인터랙티브 UI
  • 뉴스 피드나 갤러리와 같은 콘텐츠 중심 애플리케이션
  • 렌더링 타이밍을 정밀하게 제어해야 하는 프로젝트

고려 사항

  • 복잡한 트리에서 과도하게 사용할 경우 성능에 영향을 줄 수 있습니다
  • 메모리 누수를 방지하기 위해 콜백을 신중하게 처리해야 합니다
  • 다양한 사용 사례에 따라 가시성 임계값 설정을 조정해야 할 수 있습니다
  • 추가 로직 없이 절대 화면 위치를 감지하는 데 적합하지 않습니다
  • 현재 뷰포트 내의 보이는 영역으로 제한

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Build

Flutter widgets

This repository contains the source code for various Flutter widgets that are developed by Google but not by the core Flutter team.

The product and source code here are neither endorsed by Google nor the Flutter team. They are mainly made available as a reference. Support is best-effort.

Packages

Package Description Version
flutter_simple_treeview A widget, that visualises a tree structure, where a node can be any widget. pub package
linked_scroll_controller A scroll controller that allows two or more scroll views to be in sync. pub package
scrollable_positioned_list A list with helper methods to programmatically scroll to an item. pub package
self_storing_input A set of input widgets that automatically save and load the entered value to a data store. pub package
visibility_detector A widget that detects the visibility of its child and notifies a callback. pub package

Issues

Please file any issues, bugs, or feature requests in the this repo.

Contributing

If you wish to contribute a change to any of the existing widgets in this repo, please review our contribution guide, and send a pull request.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트