//flutter import 'package:flutter/material.dart'; void main() { return runApp(TestPage()); } //リスト4.29 class TestPage extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'ListView', home: Scaffold( appBar: AppBar(title: Text('ListView')), body: HogeListWidget() ) ); } } class HogeListWidget extends StatefulWidget { @override State<HogeListWidget> createState() => _HogeListWidgetState(); } class _HogeListWidgetState extends State<HogeListWidget> { final itemList = List.generate(500, (i) => 'Item$i'); @override Widget build(BuildContext context) { return GridView.count( crossAxisCount: 2, children: List.generate(100, (i) => Icon(Icons.flutter_dash, size: 100) ) ); } }