//flutter import 'package:flutter/material.dart'; void main() { return runApp(TestPage()); } //リスト4.51 class TestPage extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Draggable', home: Scaffold( appBar: AppBar(title: Text('Draggable')), body: Center( child: Draggable( feedback: Icon(Icons.run_circle_outlined, size: 100), childWhenDragging: Icon(Icons.play_arrow, size: 100), onDraggableCanceled: (_, offset) {}, child: Icon(Icons.stop, size: 100) ) ) ) ); } }