Last active
June 27, 2018 10:15
-
-
Save jmolins/e9a227788928740715e2725a4102e87c to your computer and use it in GitHub Desktop.
Hot reload medium post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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