Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created February 19, 2020 15:59
Show Gist options
  • Save azamsharp/7d363ec43f7d69502b0e0d81ec7c1961 to your computer and use it in GitHub Desktop.
Save azamsharp/7d363ec43f7d69502b0e0d81ec7c1961 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() => runApp(App());
class _AppState extends State<App> {
int _counter = 0;
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Counter App",
home: Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text("0",style: TextStyle(fontSize: 32)),
FlatButton(
child: Text("Increment", style: TextStyle(color: Colors.white)),
onPressed: () {},
color: Colors.green
)
]),
),
)
);
}
}
class App extends StatefulWidget {
@override
_AppState createState() => _AppState();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment