Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @override
- Widget build(BuildContext context) {
- var loginBtn = new RaisedButton(
- child: new Text("LOGIN"),
- color: Colors.primaries[0],
- );
- var loginForm = new Column(
- children: <Widget>[
- new Text(
- "Login App",
- textScaleFactor: 2.0,
- ),
- new Form(
- key: formKey,
- child: new Column(
- children: <Widget>[
- new Padding(
- padding: const EdgeInsets.all(8.0),
- child: new TextFormField(
- onSaved: (val) => _username = val,
- validator: (val) {
- return val.length < 10
- ? "Username must have atleast 10 chars"
- : null;
- },
- decoration: new InputDecoration(labelText: "Username"),
- ),
- ),
- new Padding(
- padding: const EdgeInsets.all(8.0),
- child: new TextFormField(
- onSaved: (val) => _password = val,
- decoration: new InputDecoration(labelText: "Password"),
- ),
- ),
- ],
- ),
- ),
- _isLoading ? new CircularProgressIndicator() : loginBtn
- ],
- crossAxisAlignment: CrossAxisAlignment.center,
- );
- return new Scaffold(
- appBar: null,
- key: scaffoldKey,
- body: new Container(
- child: new Center(
- child: new ClipRect(
- child: new BackdropFilter(
- filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
- child: new Container(
- child: loginForm,
- height: 500.0,
- width: 300.0,
- decoration: new BoxDecoration(
- color: Colors.grey.shade200.withOpacity(0.5)),
- ),
- ),
- ),
- ),
- ),
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement