Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flash_chat/components/ActionButton.dart';
- import 'package:flutter/material.dart';
- import '../constants.dart';
- class LoginScreen extends StatefulWidget {
- static const String route = '/login';
- @override
- _LoginScreenState createState() => _LoginScreenState();
- }
- class _LoginScreenState extends State<LoginScreen> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- resizeToAvoidBottomPadding: false,
- backgroundColor: Colors.white,
- body: Center(
- child: Padding(
- padding: EdgeInsets.fromLTRB(
- 24.0, 0, 24.0, MediaQuery.of(context).viewInsets.bottom),
- child: SingleChildScrollView(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: <Widget>[
- Hero(
- tag: 'lightningLogo',
- child: Container(
- height: 200.0,
- child: Image.asset('images/logo.png'),
- ),
- ),
- SizedBox(
- height: 48.0,
- ),
- TextField(
- style: TextStyle(color: Colors.black),
- obscureText: true,
- onChanged: (value) {
- //Do something with the user input.
- },
- decoration: kLoginInputDecoration.copyWith(
- hintText: 'Enter your email'),
- ),
- SizedBox(
- height: 8.0,
- ),
- TextField(
- style: TextStyle(color: Colors.black),
- onChanged: (value) {
- //Do something with the user input.
- },
- decoration: kLoginInputDecoration.copyWith(
- hintText: 'Enter your password'),
- ),
- SizedBox(
- height: 24.0,
- ),
- ActionButton(
- () => {},
- Colors.lightBlueAccent,
- 'Log In',
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement