//flutter
import 'package:flutter/material.dart';
void main() {
return runApp(TestPage());
}
//リスト4.10
class TestPage extends StatelessWidget{
@override
Widget build(BuildContext context){
return MaterialApp(
title: 'ボタン',
home: Scaffold(
appBar: AppBar(title:Text('ボタン')),
body: Center(
child: Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
ElevatedButton(onPressed: (){},
style:ElevatedButton.styleFrom(
side:BorderSide(
color: Colors.grey,
width: 2,
),
onPrimary: Colors.black,
),
child: Text('ElevatedButton',
style: TextStyle(
color: Colors.white,
))),
IconButton(
onPressed: (){},
icon: Icon(Icons.flutter_dash),
color: Colors.pink,
iconSize: 100,
),
OutlinedButton(onPressed: (){}, child: Text('OutlinedButton')),
TextButton(onPressed: (){}, child: Text("TextButton"))
])),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {},
backgroundColor: Colors.blueGrey,
label: const Text('Next'),
icon: const Icon(Icons.arrow_forward)
)
),
);
}
}