|
| 1 | +--- |
| 2 | +title: "Modal Bottom Sheet 액션" |
| 3 | +description: "모달 바텀시트를 띄우는 액션" |
| 4 | +--- |
| 5 | + |
| 6 | +`StacModalBottomSheetAction`은 Flutter의 `showModalBottomSheet`를 JSON으로 제어할 수 있게 해 줍니다. |
| 7 | + |
| 8 | +## 속성 |
| 9 | + |
| 10 | +| 속성 | 타입 | 설명 | |
| 11 | +|------|------|------| |
| 12 | +| widget | `Map<String, dynamic>?` | 바텀시트 내부에 표시할 위젯 | |
| 13 | +| request | `StacNetworkRequest?` | 바텀시트를 띄우기 전 실행할 네트워크 요청 | |
| 14 | +| assetPath | `String?` | 에셋에 있는 JSON 경로 | |
| 15 | +| backgroundColor | `String?` | 배경색 | |
| 16 | +| barrierLabel | `String?` | 배리어의 접근성 라벨 | |
| 17 | +| elevation | `double?` | 바텀시트 고도 | |
| 18 | +| shape | `StacBorder?` | 모서리 모양 | |
| 19 | +| constraints | `StacBoxConstraints?` | 크기 제약 | |
| 20 | +| barrierColor | `String?` | 배리어 색상 | |
| 21 | +| isScrollControlled | `bool` | 전체 높이를 사용할지 여부(기본값 `false`) | |
| 22 | +| useRootNavigator | `bool` | 루트 내비게이터 사용 여부(기본값 `false`) | |
| 23 | +| isDismissible | `bool` | 외부 탭으로 닫히도록 할지(기본값 `true`) | |
| 24 | +| enableDrag | `bool` | 드래그로 닫기 가능 여부(기본값 `true`) | |
| 25 | +| showDragHandle | `bool?` | 드래그 핸들을 표시할지 | |
| 26 | +| useSafeArea | `bool` | SafeArea 적용 여부(기본값 `false`) | |
| 27 | + |
| 28 | +## 예제 |
| 29 | + |
| 30 | +```json |
| 31 | +{ |
| 32 | + "actionType": "showModalBottomSheet", |
| 33 | + "widget": { |
| 34 | + "type": "container", |
| 35 | + "height": 200, |
| 36 | + "color": "amber", |
| 37 | + "child": { |
| 38 | + "type": "center", |
| 39 | + "child": { |
| 40 | + "type": "column", |
| 41 | + "mainAxisAlignment": "center", |
| 42 | + "mainAxisSize": "min", |
| 43 | + "children": [ |
| 44 | + { |
| 45 | + "type": "text", |
| 46 | + "data": "Modal BottomSheet" |
| 47 | + }, |
| 48 | + { |
| 49 | + "type": "elevatedButton", |
| 50 | + "child": { |
| 51 | + "type": "text", |
| 52 | + "data": "Close BottomSheet" |
| 53 | + }, |
| 54 | + "onPressed": { |
| 55 | + "actionType": "pop" |
| 56 | + } |
| 57 | + } |
| 58 | + ] |
| 59 | + } |
| 60 | + } |
| 61 | + } |
| 62 | +} |
| 63 | +``` |
| 64 | + |
| 65 | +```json |
| 66 | +{ |
| 67 | + "actionType": "showModalBottomSheet", |
| 68 | + "assetPath": "assets/widgets/modal_bottom_sheet.json" |
| 69 | +} |
| 70 | +``` |
| 71 | + |
| 72 | +```json |
| 73 | +{ |
| 74 | + "actionType": "showModalBottomSheet", |
| 75 | + "request": { |
| 76 | + "url": "https://example.com/api", |
| 77 | + "method": "get" |
| 78 | + } |
| 79 | +} |
| 80 | +``` |
0 commit comments