//flutter import 'package:flutter/material.dart'; void main() { return runApp(TestPage()); } //リスト4.25 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> { @override Widget build(BuildContext context) { return ListView.builder( itemBuilder: (context, index) { return Text('テキスト'); } ); } }