Advertisement
joaopaulofcc

respbotoes

Nov 7th, 2020
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4. runApp(MyApp());
  5. }
  6.  
  7. class MyApp extends StatelessWidget {
  8. @override
  9. Widget build(BuildContext context) {
  10. return MaterialApp(
  11. title: 'Prova 01',
  12. theme: ThemeData(
  13. primarySwatch: Colors.blue,
  14. visualDensity: VisualDensity.adaptivePlatformDensity,
  15. ),
  16. home: MyHomePage(title: 'Prova 01'),
  17. );
  18. }
  19. }
  20.  
  21. class MyHomePage extends StatefulWidget {
  22. MyHomePage({Key key, this.title}) : super(key: key);
  23.  
  24. final String title;
  25.  
  26. @override
  27. _MyHomePageState createState() => _MyHomePageState();
  28. }
  29.  
  30. class _MyHomePageState extends State<MyHomePage> {
  31.  
  32. @override
  33. Widget build(BuildContext context) {
  34. return Scaffold(
  35. appBar: AppBar(
  36. title: Text(widget.title),
  37. ),
  38. body: Center(
  39. child: Row(
  40. mainAxisAlignment: MainAxisAlignment.center,
  41. children: <Widget>[
  42. new Padding(
  43. padding: const EdgeInsets.all(8.0),
  44. child: new RaisedButton(
  45. textColor: Colors.white,
  46. color: Colors.red,
  47. onPressed: () {},
  48. child: new Text("BTN1"),
  49. ),
  50. ),
  51. new Padding(
  52. padding: const EdgeInsets.all(8.0),
  53. child: new RaisedButton(
  54. textColor: Colors.white,
  55. color: Colors.green,
  56. onPressed: () {},
  57. child: new Text("BTN2"),
  58. ),
  59. ),
  60. new Padding(
  61. padding: const EdgeInsets.all(8.0),
  62. child: new RaisedButton(
  63. textColor: Colors.white,
  64. color: Colors.blue,
  65. onPressed: () {},
  66. child: new Text("BTN3"),
  67. ),
  68. )
  69. ],
  70. ),
  71. ),
  72. );
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement