반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 플러터
- command
- 한빛미디어
- 다트
- 프로그래밍
- 코딩
- 책
- flutter
- ai
- 리눅스
- 도커
- 유데미 러닝크루
- 명령어
- docker
- 개발
- 유데미
- GIT
- vscode
- 도서
- 수학 애니메이션
- 파이썬
- 개발자
- manim
- python
- dart
- 개발자도서
- Code Generation
- linux
- 디자인패턴
- 깃
Archives
- Today
- Total
승상의 코딩 블로그
[Flutter] 슬라이드 가능한 위젯 (flutter_slidable) 본문
반응형
단순히 버튼을 눌러서 처리하는 것보다 위젯을 슬라이드 하는 디자인은 다양한 곳에서 찾아볼 수 있다.
플러터에는 이러한 기능을 쉽게 사용할 수 있는 flutter_slidable 이라는 패키지가 있다.
https://pub.dev/packages/flutter_slidable
flutter_slidable | Flutter package
A Flutter implementation of slidable list item with directional slide actions that can be dismissed.
pub.dev
설치
pubspec.yaml 에 flutter_slidable 을 추가한다.
dependencies:
flutter_slidable:^3.1.2
예시 코드
단순히 Sliable 위젯으로 감싸주고 몇 개의 속성만 정의하면 된다.
motion 속성의 경우, ScrollMotion 외에 BehindMotion, DrawerMotion, StretchMotion 이 있다. 각 속성에 대한 위젯 동작 미리보기는 패키지 홈페이지에 설명하고 있다.
dismissible 속성의 경우, DismissiblePane 위젯을 할당해주면 끝까지 슬라이드 할 수 있게 해준다.
반응형
'Flutter (플러터)' 카테고리의 다른 글
[Flutter] 색상, 스타일 등 체계적으로 관리하기 (0) | 2025.01.11 |
---|---|
[Flutter] 화면 아래로 당겨서 새로고침(Refresh) 하기 (0) | 2025.01.04 |
[Flutter] extension 으로 코드를 더 깔끔하고 효율적으로 만들기 (0) | 2024.12.19 |
[Flutter] 불변 객체를 왜 사용할까? (0) | 2024.12.19 |
[Flutter] clone, copyWith 를 활용한 깊은 복사 (0) | 2024.12.19 |
Comments