Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- golang
- otel
- log
- opentelemetry
- mysql
- rc-service
- 윈도우즈 터미널
- go
- shared_preload_libraries
- 무선 디버깅
- Android
- User
- module upgrade
- elasticSearch
- docker
- user-secrets
- option pattern
- IDX Project
- 옵션 패턴
- Flutter
- Linux
- pg_stat_statements
- AnimatedPositioned
- vscode
- SQL Server
- sqlc
- openrc
- 맥미니
- DotNet
- version 2
Archives
- Today
- Total
CATCHV Blog
[flutter] SliverGrid SliverGridDelegateWithMaxCrossAxisExtent 본문
반응형
maxCrossAxisExtent 컬럼의 최대 넓이로 row child 갯수 생성
SliverGrid(
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: 200,
mainAxisSpacing: 1.0,
crossAxisSpacing: 1.0,
childAspectRatio: 2.0,
),
minCrossAxisExtent이 없으므로 계산을 통해서 컬럼의 최소 넓이로 row child 갯수를 생성
double deviceWidth = MediaQuery.of(context).size.width;
SliverGrid(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: (deviceWidth / 100).floor() != 0 ? (deviceWidth / 100).floor() : 1,
mainAxisSpacing: 1.0,
crossAxisSpacing: 1.0,
childAspectRatio: 2.0,
),
반응형
'Dev > flutter' 카테고리의 다른 글
flutter upgrade 에러 (0) | 2023.10.17 |
---|---|
Visual Studio(VSCode) Android ADB WLAN 무선 디버깅 (0) | 2023.10.17 |
[flutter] Widget build 이후 callback (0) | 2023.02.15 |
flutter pub upgrade (0) | 2023.02.07 |
[flutter] mouse point drag scroll (0) | 2022.12.21 |
Comments