Shimmer는 UI 컴포넌트에 반짝임 로딩 효과를 쉽게 추가할 수 있도록 도와주는 Flutter 패키지입니다. 부드럽고 애니메이션된 자리 표시자 외관을 생성합니다. 리스트, 카드 또는 이미지에서 콘텐츠 로딩 상태를 모방하는 데 이상적이며, 데이터 가져오기 중 사용자 경험을 향상시킵니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원하여 기기 간 일관된 동작을 보장합니다. 최소한의 설정으로 복잡한 애니메이션을 작성하지 않고도 시각적으로 매력적인 로딩 인디케이터를 빠르게 구현할 수 있습니다.
사용 사례
목록 내 로딩 자리표시자
애니메이션 카드 자리 표시자
이미지 로딩 스켈레톤
데이터 가져오기 중 사용자 경험 개선
동적 콘텐츠 미리보기
주요 기능
간단한 API 통합
크로스 플랫폼 지원
사용자 정의 반짝임 색상
부드러운 애니메이션 효과
경량이고 성능이 뛰어남
적합한 대상
시각적 완성도를 추구하는 UI 디자이너
동적 콘텐츠 화면을 구축하는 개발자
자주 데이터를 로드하는 앱
인터랙티브 인터페이스 프로토타이핑
인식되는 성능 향상
고려 사항
정적 콘텐츠에 적합하지 않습니다
위젯 트리 내에서 적절한 위치에 배치되어야 합니다
과도하게 사용할 경우 성능에 영향을 줄 수 있습니다
기본 스타일링을 넘어서는 사용자 정의가 제한적
투명한 배경과 함께 사용하는 것이 가장 좋습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Shimmer
A lightweight Flutter widget that paints a moving highlight over placeholder
UI. Typical uses are skeleton screens while data loads, and a sliding highlight
on a call to action.
Install
dependencies:shimmer:^4.0.0material_ui:^1.0.1
shimmer 4.0 uses Flutter's standalone material_ui package (Flutter 3.44+). Apps that still import package:flutter/material.dart can wrap those subtrees in MaterialUiCompatibilityBridge.
Shimmer.fromColors is the usual constructor. Build the child from solid
shapes (Container, Row, Column). The gradient replaces those colors;
transparent pixels stay transparent.
*Required on Shimmer(...). Shimmer.fromColors takes baseColor and
highlightColor instead.
Performance
Wrap a list of placeholders in one Shimmer, not one Shimmer per row.
Keep child simple and static. Fancy widgets (images, text with decoration,
elevation) often look wrong because the shader replaces their colors.
Toggle enabled to false when loading finishes so the ticker stops.
Example
The example/ app shows a loading list and a “slide to unlock” highlight.
From the repository root:
cd example && flutter run
How it works
Shimmer drives an AnimationController and paints a ShaderMaskLayer over
the child (BlendMode.srcIn). The highlight rectangle is three times the
child size so the band can travel fully across the widget.