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
- Stream
- MATLAB
- DART
- Flutter
- Algorithm
- Dreamhack
- Widget
- BOF
- rao
- Kaggle
- Image Processing
- ML
- 백준
- Got
- system hacking
- PCA
- C++
- FastAPI
- ARM
- llm을 활용 단어장 앱 개발일지
- pytorch
- BFS
- study book
- Computer Architecture
- 영상처리
- fastapi를 사용한 파이썬 웹 개발
- BAEKJOON
- bloc
- 파이토치 트랜스포머를 활용한 자연어 처리와 컴퓨터비전 심층학습
- MDP
Archives
- Today
- Total
Bull
[Flutter::Widget] Drawer icon 변경 방법! 본문
https://stackoverflow.com/questions/59554348/how-can-i-change-drawer-icon-in-flutter
How can I change Drawer icon in flutter?
The drawer has this default three horizontal bars as default icon but I want to change it to something else. I have checked the possible options under the Drawer(), but no property seems to be atta...
stackoverflow.com
검색어
"Drawer icon flutter"
변경 방법
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('hi'),
leading: IconButton(
icon: Icon(Icons.accessible),
onPressed: () => Scaffold.of(context).openDrawer(),
),
),
drawer: Drawer(),
);
}
drawer 프로퍼티는 Scaffold 위젯의 프로퍼티라서 appBar의 프로퍼티로 들어가지는 않지만 appBar의 leading 프로퍼티를 통해서 아이콘을 지정해줄 수 있다.
문서를 딱히 찾아보진 않았지만 drawer프로퍼티는 코드에 있는 onPressed 에 적힌 메소드 호출 부분을 구현시켜 놓았다고 생각해도 좋을 것 같다!

'Software Framework > Flutter' 카테고리의 다른 글
| [Flutter::State] Bloc Repository의 역할 (with FastAPI) (0) | 2024.08.15 |
|---|---|
| [Flutter::Widget] 토글 스위치...? 토글 버튼? (ToggleButtons class) (0) | 2024.08.14 |
| [Flutter::Widget] Textfield Widget size 조절 방법! (0) | 2024.08.14 |
| [Flutter::Widget] TextField의 Border radius과 Background color를 fit하게 넣기 (0) | 2024.08.10 |
| [Flutter::flame] Flame 엔진을 이용하여 구글의 공룡 게임을 만들어 보자! (0) | 2024.08.07 |