//flutter import 'package:flutter/material.dart'; void main() { return runApp(TestPage()); } //リスト4.54 class TestPage extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'SingleChildScrollView', home: Scaffold( appBar: AppBar(title: Text('SingleChildScrollView')), body: SingleChildScrollView( child: Padding( padding: EdgeInsets.all(8), child: Text(makeText()) ) ) ) ); } String makeText() { var text = ''; for (var i = 0; i < 50; i++) { text += 'サンプルのテキスト $i\n'; } return text; } }