flippable_box는 두 개의 서로 다른 콘텐츠면 사이를 뒤집을 수 있는 이중면 컨테이너를 제공하는 Flutter 패키지입니다. 앞면과 뒷면 사이에 부드럽고 애니메이션 효과가 있는 전환을 가능하게 하며, 카드나 플립 효과와 같은 인터랙티브 UI 요소에 적합합니다. Android, iOS, Web, macOS, Windows, Linux 등 주요 모든 플랫폼을 지원하여 크로스플랫폼 애플리케이션에 유연하게 활용할 수 있습니다. Flutter의 애니메이션 시스템 기반으로 구현되어 반응성 있고 사용자 정의 가능한 뒤집기 동작을 제공합니다.
사용 사례
인터랙티브 카드 인터페이스
제품 세부 정보 플립 카드
퀴즈 또는 플래시카드 앱
애니메이션 탐색 요소
게임 UI 구성 요소
주요 기능
부드러운 3D 플립 애니메이션
사용자 정의 가능한 앞면 및 뒷면 콘텐츠
크로스 플랫폼 호환성
기존 위젯과의 간편한 통합
터치 및 제스처 트리거를 지원합니다
적합한 대상
인터랙티브 UI를 구축하는 개발자
교육 앱 개발자
게임화 애플리케이션 디자이너
동적 전환을 찾는 디자이너
고려 사항
저사양 기기에서 성능에 영향을 미칠 수 있습니다
복잡한 콘텐츠의 경우 세심한 레이아웃 관리가 필요합니다
컨테이너 기반 전환에만 제한됨
상호작용이 없는 정적 표시에 적합하지 않습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
flippable_box
FlippableBox is a double-sided Container, that holds two pieces of content and automatically re-sizes to match its content, whenever its flipped over.
NOTE: It is required that the children are Containers, and have their size or constraints set manually, as shown in the example above. This is so the Box knows what its target size is when animating.
To control the flip animation, you can set duration, curve and flipVt which will cause the flip to be in the vertical axis rather than horizontal.
You can also specify a bg which takes a BoxDecoration, and a borderRadius in case you'd like to clip the child contents.
FlippableBox(
front: child1,
back: child2,
isFlipped: _isFlipped,
borderRadius: 32, //Uses a ClipRRect to clip contents of child containers
bg: BoxDecoration(color: Colors.white), //Paints the box itself with a shared background
duration: 0.5, //half second duration
flipVt: true, //Flip vertically instead of horizontal
curve: Curves.easeOut,
)