google-site-verification=Ob4bKoeqSfwCxusijmOIG1yFGPBhdxoJWBwcZu9KXRk

Flutter Login UI Design

Output Screen



This is My First Design 

Source Code

//todo: import libaray
import 'package:flutter/material.dart';
//todo:   Create main() Function
void main() {
// todo: run App on Mobile Device (run inside main method)
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  final barColor = const Color(0xFF4AC412);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: barColor,
          title: Text("Login Page"),
        ),
        body: new Center(
          child: Column(
            // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: <Widget>[
              SizedBox(height: 50.0),
              TextFormField(
                decoration: new InputDecoration(
                  hintText: 'Enter Email',
                  fillColor: Colors.white,
                  border: new OutlineInputBorder(
                    borderRadius: new BorderRadius.circular(25.0),
                  ),
                ),
                textAlign: TextAlign.center,
              ),
              SizedBox(
                height: 25.0,
              ),
              TextFormField(
                textAlign: TextAlign.center,
                obscureText: true,
                decoration: new InputDecoration(
                  hintText: 'Enter Password',
                  fillColor: Colors.white,
                  border: new OutlineInputBorder(
                    borderRadius: new BorderRadius.circular(25.0),
                    borderSide: new BorderSide(),
                  ),
                ),
              ),
              SizedBox(
                height: 25.0,
              ),
              new RaisedButton(
                color: Color(0xFF019031),
                textColor: Colors.white,
                child: Text(
                  'SIGN IN',
                  style: TextStyle(
                    fontSize: 20.0,
                  ),
                ),
                onPressed: () {},
              ),
              SizedBox(height: 25.0),
              new Text("Don't have a account ? Sign UP"),
              SizedBox(height: 25.0),
              new RaisedButton(
                color: Color(0xFF019031),
                textColor: Colors.white,
                child: Text(
                  'SIGN UP',
                  style: TextStyle(
                    fontSize: 20.0,
                  ),
                ),
                onPressed: () {},
              ),
            ],
          ),
        ),
      ),
    );
  }
}

No comments:

Post a Comment

Pages