Skip to content

Instantly share code, notes, and snippets.

@MichaelMarner
Last active September 6, 2019 12:32
Show Gist options
  • Save MichaelMarner/3c29f222d919758e773223b5d9d60281 to your computer and use it in GitHub Desktop.
Save MichaelMarner/3c29f222d919758e773223b5d9d60281 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: AlertDialog(
title: Text('Add your address!'),
contentPadding: EdgeInsets.all(18),
content: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
TextFormField(
decoration: InputDecoration(hintText: 'Address Title'),
),
TextFormField(
decoration: InputDecoration(
labelText: 'Click Scan HTML Address Button!',
hasFloatingPlaceholder: true,
icon: Padding(
padding: const EdgeInsets.all(0.0),
child: null,
),
),
),
],
),
actions: <Widget>[
FlatButton(
child: Text('Cancel'),
onPressed: () {},
),
FlatButton(
child: Text('Save'),
onPressed: () {},
),
],
)),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment