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('Exemplo de Botão'), ), body: Center( child: ElevatedButton( onPressed: () { // Lógica a ser executada quando o botão for pressionado. print('Botão pressionado!'); }, child: Text('Pressione o Botão'), ), ), ), ); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter