firestore_ui는 FirebaseAnimatedList의 기능을 Cloud Firestore로 가져와 Firestore 컬렉션에서 동적이고 애니메이션 효과가 있는 리스트 렌더링을 가능하게 하는 Flutter 패키지입니다. 실시간 업데이트를 지원하며, 페이지네이션 또는 필터링된 리스트와 같은 다양한 사용 사례를 위한 추가 변형도 포함되어 있습니다. Firebase의 클라우드 데이터베이스와 원활한 통합을 위해 설계되어, 플랫폼 간 실시간 데이터 변경을 반영하는 반응형 UI 구축을 간소화합니다.
사용 사례
리스트에서 실시간 데이터 표시
Firestore에서의 동적 콘텐츠 업데이트
페이지 또는 필터링된 Firestore 목록
실시간 협업 앱
오프라인 사용 가능한 목록 보기
주요 기능
애니메이션 목록 렌더링
실시간 Firestore 업데이트 지원
여러 목록 변형 포함
크로스 플랫폼 호환성
FirebaseAnimatedList과 유사한 간단한 API
적합한 대상
Cloud Firestore를 사용하는 개발자
실시간 업데이트 목록이 필요한 앱
UI 중심의 Firebase 애플리케이션
다중 플랫폼에서의 Flutter 프로젝트
고려 사항
Firebase 및 Cloud Firestore 설정이 필요합니다
대규모 데이터 세트에서 성능에 영향을 줄 수 있습니다
원시 ListView에 비해 사용자 지정이 제한적입니다
중간 규모의 컬렉션에 가장 적합
Firebase SDK 버전 호환성에 따라 다릅니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
firestore_ui
This project started as a Pull Request to the official cloud_firestore plugin, but unfortunately they are still polishing the main features and this had to be postponed; it's based on firebase_database's version.
But fear not, my fellow Cloud Firestore users, this is a package that extracted the main code from that PR and now it's available to use!
Custom parameters
bool linear - This will make it so it just uses .add instead of .insert, this usually leads to less issues in the order if your list updates linearly (like a chat)
void onLoaded(QuerySnapshot snapshot) - You can use this to access the most recent QuerySnapshot that came from the stream
bool filter(DocumentSnapshot snapshot) - This allows you to filter out specific snapshots on the rendering phase, return true if you want that item to be filtered
bool debug - Set this to see all logs related to inserting/removing/updating items on any variant of the list
How to use
All the examples below are from the actual example folder, please run that to see how it behaves!
List
Just set it up as you would with a ListView.builder:
Just set it up as you would with a GridView.count, alongside the necessary crossAxisCount, all the other parameters from the SliverGridDelegateWithFixedCrossAxisCount are also available:
Special thanks to @letsar for the flutter_staggered_grid_view package! Without it, this part wouldn't be available; please check out the library for more info on how it works!