xxxxxxxxxx
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Button Types')),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
RaisedButton(
onPressed: () {
// Action to be performed when this button is pressed
},
child: Text('Raised Button'),
),
FlatButton(
onPressed: () {
// Action to be performed when this button is pressed
},
child: Text('Flat Button'),
),
OutlineButton(
onPressed: () {
// Action to be performed when this button is pressed
},
child: Text('Outline Button'),
),
IconButton(
onPressed: () {
// Action to be performed when this button is pressed
},
icon: Icon(Icons.add),
),
],
),
),
),
);
}
}