Backdrop은 Material Design Backdrop 컴포넌트를 구현하는 Flutter 패키지로, 메인 콘텐츠 영역과 보조 패널(드래그 또는 시트 등) 사이의 부드러운 전환을 가능하게 합니다. 파라랄랙스 효과가 있는 인터랙티브 배경 및 사용자 정의 가능한 애니메이션을 지원합니다. Android, iOS, Web, macOS, Windows, Linux에서 사용하도록 설계되었으며, 직관적인 탐색과 계층적 인터페이스를 제공하여 사용자 경험을 향상시킵니다. 표준 위젯 패턴을 사용해 Flutter 앱에 원활하게 통합할 수 있습니다.
사용 사례
슬라이딩 사이드 패널 만들기
파라럭스를 활용한 인터랙티브 배경 구현
반응형 네비게이션 드로어 구축
계층적 레이아웃을 통한 UI 깊이 향상
모바일 우선 인터페이스 컴포넌트 설계
주요 기능
패럴랙스 스크롤 효과
부드러운 전환 애니메이션
사용자 정의 가능한 백드롭 동작
여러 플랫폼을 지원합니다
내장된 제스처 처리
확장 가능한 위젯 구조
적합한 대상
모바일 앱 개발자
Material Design를 사용하는 UI/UX 디자이너
계층적 탐색이 필요한 앱
복잡한 바텀 시트를 개발하는 개발자
사용자 인터랙션의 완성도에 집중하는 팀
고려 사항
Flutter의 애니메이션 시스템에 대한 이해가 필요합니다
저사양 기기에서 성능에 영향을 줄 수 있습니다
혼잡을 피하기 위해 신중한 설계가 필요합니다
기본 구성 외의 사용자 지정은 제한적
일반적인 사용보다는 특정 레이아웃 패턴에 적합함
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
backdrop
ARCHIVE NOTE: Backdrop was based on the Material 2 Backdrop specification, which is no longer actively maintained. Material 3 does not include a Backdrop specification. As a result, this package is no longer actively developed and is limited to maintenance and critical fixes.
To use backdrop for navigation, use the provided BackdropNavigationBackLayer as backLayer.
The BackdropNavigationBackLayer contains a property items representing the list elements shown on the back layer. The front layer has to be "manually" set depending on the current index, which can be accessed with the onTap callback.
To access backdrop related functionalities, use Backdrop.of(context) to get underlying BackdropScaffoldState.
BackdropScaffoldState exposes various properties and methods like:
properties
animationController -> AnimationController
scaffoldKey -> GlobalKey<ScaffoldState>
isBackLayerConcealed -> bool
isBackLayerRevealed -> bool
methods
fling()
concealBackLayer()
revealBackLayer()
Note:Backdrop is an InheritedWidget and therefore like Scaffold.of, Theme.of and MediaQuery.of, the BuildContext context passed to Backdrop.of(context) should be of a Widget that is under the BackdropScaffold in the "widget tree". In other words, Backdrop.of called inside a widget where the BackdropScaffold is initalized will not work explicitly, since the context passed is of the widget that will build BackdropScaffold therefore above BackdropScaffold. This can be solved by either making a seperate Widget where Backdrop.of needs to be used and make it the "child" of BackdropScaffold or wrap the Backdrop.of usage around Builder widget so that the "correct" context (from Builder) is passed to Backdrop.of. This answere on SO and FWotW video on Builder gives a very good idea of how and why Builder works in later case.