how to show button in flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: ListView(
children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 100),
child: new ConstrainedBox(
constraints: const BoxConstraints(minWidth: double.infinity),
child: new RaisedButton(
color: Colors.blue,
textColor: Colors.white,
disabledColor: Colors.grey,
disabledTextColor: Colors.black,
splashColor: Colors.blueAccent,
onPressed: () {},
child: Text(
"Apply this buttom",
style: TextStyle(fontSize: 15),
)
),
),
)
],
)
));
}
}