1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00
Files
samples/provider_shopper/lib/screens/login.dart
xster ce35e45702 add thumbnails to the books example to make memory leaks easier to test (#1353)
* add thumbnails to the books example to make memory leaks easier to test

* also add profile build

* migrate material 3 demo code to avoid warning

* Revert "migrate material 3 demo code to avoid warning"

This reverts commit 7df37d9f65.

* fix lints in various packages

* DoNothingAndStopPropagationIntent const conflicts between stable and beta, add lint ignore for now
2022-08-23 23:45:12 -07:00

54 lines
1.5 KiB
Dart

// 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 {
const MyLogin({super.key});
@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(
onPressed: () {
Navigator.pushReplacementNamed(context, '/catalog');
},
style: ElevatedButton.styleFrom(
// ignore: deprecated_member_use
primary: Colors.yellow,
),
child: const Text('ENTER'),
)
],
),
),
),
);
}
}