|
|
|
// 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: const EdgeInsets.all(80.0),
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'Welcome',
|
|
|
|
style: Theme.of(context).textTheme.headline1,
|
|
|
|
),
|
|
|
|
TextFormField(
|
|
|
|
decoration: const InputDecoration(
|
|
|
|
hintText: 'Username',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextFormField(
|
|
|
|
decoration: const InputDecoration(
|
|
|
|
hintText: 'Password',
|
|
|
|
),
|
|
|
|
obscureText: true,
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
height: 24,
|
|
|
|
),
|
|
|
|
ElevatedButton(
|
|
|
|
child: const Text('ENTER'),
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pushReplacementNamed(context, '/catalog');
|
|
|
|
},
|
|
|
|
style: ElevatedButton.styleFrom(
|
|
|
|
primary: Colors.yellow,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|