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
Durval Ledo fe8464f0f9 fix: provider_shopper login button invisible text (#1560)
Fixed text on provider_shopper login button being invisible
2023-01-14 10:50:47 +10: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';
import 'package:go_router/go_router.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.displayLarge,
),
TextFormField(
decoration: const InputDecoration(
hintText: 'Username',
),
),
TextFormField(
decoration: const InputDecoration(
hintText: 'Password',
),
obscureText: true,
),
const SizedBox(
height: 24,
),
ElevatedButton(
onPressed: () {
context.pushReplacement('/catalog');
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.yellow,
),
child: const Text('ENTER'),
)
],
),
),
),
);
}
}