Skip to content

Instantly share code, notes, and snippets.

@jmolins
Last active June 27, 2018 10:15
Show Gist options
  • Save jmolins/e9a227788928740715e2725a4102e87c to your computer and use it in GitHub Desktop.
Save jmolins/e9a227788928740715e2725a4102e87c to your computer and use it in GitHub Desktop.
Hot reload medium post
import 'package:flutter/material.dart';
void main() => runApp(new MaterialApp(
home: Scaffold(
appBar: AppBar(title: new Text('Test')),
body: MyHome(),
),
));
class MyHome extends StatelessWidget {
MyHome({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Center(
child: RaisedButton(
child: Text('Click here'),
onPressed: () {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text("Title"),
content: Text("Some random content"),
);
},
);
},
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment