1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 23:08:59 +00:00

Added missing login page (#339)

This commit is contained in:
Aadarsh Patel
2020-03-02 23:29:58 +05:30
committed by GitHub
parent 1ca27ce6db
commit c6f6b5b757
3 changed files with 55 additions and 1 deletions

View File

@@ -0,0 +1,48 @@
// Copyright 2020 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
class MyLogin extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
padding: EdgeInsets.all(80.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Welcome',
style: Theme.of(context).textTheme.display4,
),
TextFormField(
decoration: InputDecoration(
hintText: 'Username',
),
),
TextFormField(
decoration: InputDecoration(
hintText: 'Password',
),
obscureText: true,
),
SizedBox(
height: 24,
),
RaisedButton(
color: Colors.yellow,
child: Text('ENTER'),
onPressed: () {
Navigator.pushReplacementNamed(context, '/catalog');
},
)
],
),
),
),
);
}
}