Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.28 KB | None | 0 0
  1. import 'package:flash_chat/components/ActionButton.dart';
  2. import 'package:flutter/material.dart';
  3.  
  4. import '../constants.dart';
  5.  
  6. class LoginScreen extends StatefulWidget {
  7.   static const String route = '/login';
  8.  
  9.   @override
  10.   _LoginScreenState createState() => _LoginScreenState();
  11. }
  12.  
  13. class _LoginScreenState extends State<LoginScreen> {
  14.   @override
  15.   Widget build(BuildContext context) {
  16.     return Scaffold(
  17.       resizeToAvoidBottomPadding: false,
  18.       backgroundColor: Colors.white,
  19.       body: Center(
  20.         child: Padding(
  21.           padding: EdgeInsets.fromLTRB(
  22.               24.0, 0, 24.0, MediaQuery.of(context).viewInsets.bottom),
  23.           child: SingleChildScrollView(
  24.             child: Column(
  25.               mainAxisAlignment: MainAxisAlignment.center,
  26.               crossAxisAlignment: CrossAxisAlignment.stretch,
  27.               children: <Widget>[
  28.                 Hero(
  29.                   tag: 'lightningLogo',
  30.                   child: Container(
  31.                     height: 200.0,
  32.                     child: Image.asset('images/logo.png'),
  33.                   ),
  34.                 ),
  35.                 SizedBox(
  36.                   height: 48.0,
  37.                 ),
  38.                 TextField(
  39.                   style: TextStyle(color: Colors.black),
  40.                   obscureText: true,
  41.                   onChanged: (value) {
  42.                     //Do something with the user input.
  43.                   },
  44.                   decoration: kLoginInputDecoration.copyWith(
  45.                       hintText: 'Enter your email'),
  46.                 ),
  47.                 SizedBox(
  48.                   height: 8.0,
  49.                 ),
  50.                 TextField(
  51.                   style: TextStyle(color: Colors.black),
  52.                   onChanged: (value) {
  53.                     //Do something with the user input.
  54.                   },
  55.                   decoration: kLoginInputDecoration.copyWith(
  56.                       hintText: 'Enter your password'),
  57.                 ),
  58.                 SizedBox(
  59.                   height: 24.0,
  60.                 ),
  61.                 ActionButton(
  62.                   () => {},
  63.                   Colors.lightBlueAccent,
  64.                   'Log In',
  65.                 ),
  66.               ],
  67.             ),
  68.           ),
  69.         ),
  70.       ),
  71.     );
  72.   }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement