Skip to content

Instantly share code, notes, and snippets.

@mrdev023
Created January 7, 2021 15:25
Show Gist options
  • Save mrdev023/959834fa66f08e38befbe719e32aa370 to your computer and use it in GitHub Desktop.
Save mrdev023/959834fa66f08e38befbe719e32aa370 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
int i = 0;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: FlatButton(
child: Text("Hello, World! $i"),
onPressed: () => setState(() => i++)),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment