mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
// 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');
|
|
},
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|