Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- class BackgroundButton extends StatefulWidget {
- @override
- BackgroundButtonState createState() => BackgroundButtonState();
- }
- class BackgroundButtonState extends State<BackgroundButton> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: Container(
- child: Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- FlatButton(
- child: Text(
- 'Click Me',
- ),
- onPressed: () {
- print('Clicked');
- }
- ),
- ],
- ),
- ),
- ),
- );
- }
- }
Add Comment
Please, Sign In to add comment