Skip to content
Codeplayon
  • Home
  • DSA
  • Jetpack
  • Flutter
  • Android
    • Android Tutorials
    • Android development
  • Kotlin
  • 5G
  • 4G LTE
    • IoT
  • e learning
  • Blog
Simple flutter login screen UI example

Simple flutter login screen UI example

February 14, 2020May 23, 2022 Codeplayon Flutter Tutorial for beginner

Hi Everyone in this flutter Tutorial I am, sharing a Simple flutter login screen UI example. Build a flutter login screen example and source code.  In this login screen UI design, I am using TextField, FlatButton.

Flutter login screen you can add username, Password, and button. and also add a test for the logo name and signup. this all, for example, I use a flutter widget, for Login screen UI design, Text widget, input widget, button widget also.

Simple flutter login screen UI example

main.dart file source code.

import "package:flutter/material.dart";
import 'app_example/Login_Screen.dart';


void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(primarySwatch: Colors.blue), home: LoginPage());
  }
}

After adding these codes in your main. dart file creates an app_example package in your lib folder. in the app_example package make a dart file with the name Login_Screen.dart. Simple flutter login screen UI example.

Login_Screen.dart File source code.

import 'package:flutter/material.dart';


class LoginPage extends StatefulWidget {

  @override
  State<StatefulWidget> createState() => new _State();
}

class _State extends State<LoginPage> {
  TextEditingController nameController = TextEditingController();
  TextEditingController passwordController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('Login Screen App'),
        ),
        body: Padding(
            padding: EdgeInsets.all(10),
            child: ListView(
              children: <Widget>[
                Container(
                    alignment: Alignment.center,
                    padding: EdgeInsets.all(10),
                    child: Text(
                      'Codeplayon',
                      style: TextStyle(
                          color: Colors.blue,
                          fontWeight: FontWeight.w500,
                          fontSize: 30),
                    )),
                Container(
                  padding: EdgeInsets.all(10),
                  child: TextField(
                    controller: nameController,
                    decoration: InputDecoration(
                      border: OutlineInputBorder(),
                      labelText: 'User Name',
                    ),
                  ),
                ),
                Container(
                  padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
                  child: TextField(
                    obscureText: true,
                    controller: passwordController,
                    decoration: InputDecoration(
                      border: OutlineInputBorder(),
                      labelText: 'Password',
                    ),
                  ),
                ),
                FlatButton(
                  onPressed: (){
                    //forgot password screen
                  },
                  textColor: Colors.blue,
                  child: Text('Forgot Password'),
                ),
                Container(
                    height: 50,
                    padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
                    child: RaisedButton(
                      textColor: Colors.white,
                      color: Colors.blue,
                      child: Text('Login'),
                      onPressed: () {
                        print(nameController.text);
                        print(passwordController.text);
                      },
                    )),
                Container(
                    child: Row(
                      children: <Widget>[
                        Text('Does not have account?'),
                        FlatButton(
                          textColor: Colors.blue,
                          child: Text(
                            'Sign in',
                            style: TextStyle(fontSize: 20),
                          ),
                          onPressed: () {
                            //signup screen
                          },
                        )
                      ],
                      mainAxisAlignment: MainAxisAlignment.center,
                    ))
              ],
            )));
  }
}

after completing, these steps run your app and see a result for the sing-in-screen example. simple and attractive dart sing in design and Simple flutter login screen UI example.

Flutter Login Screen UI example Full Souce Code on Github

 

 

Read More Tutorial 

  • Codeplayon Jetpack Compose Tutorial 
  • Codeplayon Android Tutorial 
  • Codeplayon Flutter Tutorial 
  • Codeplayon on Github
Tagged Build a login UI with Flutter Creating Awesome Login Screen in Flutter flutter login screen flutter login screen tutorial Login Screen - Flutter Awesome login screen flutter tutorial simple login screen flutter example

Post navigation

Create a Simple Splash Screen with Flutter and Dart
Simple intro slider for Flutter App Example
  • iBOMMA Telugu, Latest HD Bollywood, Hollywood, Tamil Movies 2023 Download ibomma.com
  • Filmymeet Bollywood Movies 2023 Download 300MB 4K HD 1080p, 720p, 480p and HD HD Free
  • The Mkvcinemas Film 2023 Bollywood, Hollywood Movies Download Free Online
  • Gogoanime 2023 : Is Gogoanime com Safe and Legal to Use?
  • Color picker for Flutter based on the Google Docs color picker 2023
Proudly powered by WordPress | Theme: NewsAnchor by aThemes.