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 |
Tags
- Flutter Example
- FutureBuilder
- Column Widget
- HTTP
- MainAxisAlignment
- Networking
- Hello World
- AppBar
- node.js
- listview
- flutter
- Row Widget
- Flutter 앱 배포
- Flutter 강좌
- navigator
- ListTile
- Snackbar
- ListView.builder
- Scaffold
- Flutter 예제
- CrossAxisAlignment
- Image.network
- WillPopScope
- Flutter Tutorial
- InkWell
- sqlite
- Row
- Cached Image
- 반석천
- Load Image
Archives
- Today
- Total
꿈꾸는 시스템 디자이너
Flutter Example - GridView Widget 본문
import 'package:flutter/material.dart';
class GridViewDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("GridView Demo")),
body: GridView.count(
crossAxisCount: 4,
children: List.generate(1000, (index) {
return boxItem(index);
}),
),
);
}
boxItem(int index) {
return Container(
height: 100,
width: 100,
decoration: BoxDecoration(
color: (index % 3 == 0)
? Colors.red
: (index % 3 == 1) ? Colors.blue : Colors.orange),
alignment: Alignment(0, 0),
child: Text(
"Item $index",
style: TextStyle(color: Colors.white),
),
);
}
}

▶ Go to Table of Contents | 강의 목차로 이동
※ This example is also available in the Flutter Code Examples app. | 본 예제는 Flutter Code Examples 앱에서도 제공됩니다.
Flutter Code Examples - Google Play 앱
Are you a beginner at Flutter? Check out the various features of Flutter through the demo. Source code for all demos is also provided.
play.google.com