반응형
화면 크기에 따라 width나 height를 설정하고 싶을때 반드시 알아야하는 문장.
MediaQuery.of(context).size.width = 화면 가로길이
MediaQuery.of(context).size.height = 화면 세로길이
가로 길이의 절반을 사용하고 싶다면
MediaQuery.of(context).size.width*0.5 와 같이 곱셈으로 조절해주면 됨.
반응형
'Front-End > Flutter' 카테고리의 다른 글
[Flutter] 06. 버튼, 잉크웰 (0) | 2024.03.16 |
---|---|
[Flutter] 05. 색상 (0) | 2024.03.16 |
[Flutter] 03. showModalBottomSheet (0) | 2024.03.16 |
[Flutter] 02. 화면 전환, 이동 (0) | 2024.03.16 |
[Flutter] 01. 위젯 계층 구조 (0) | 2024.03.16 |