Login Screen With Wave Clipper Curved In Flutter Using Android

admin_img Posted By Bajarangi soft , Posted On 23-09-2020

I am, sharing Simple flutter Wave Cliper Curved login screen UI example. Build a flutter Wave Cliper Curved login screen example and source code. In this login screen UI design, I am using TextField, FlatButton.

Wave Clipper Curved With Login Screen In Flutter Android App

Step 1
we will add  flutter_custom_clippers: ^1.1.2  dependency name to
our pubspec.yaml file as shown below:

dependencies:
  flutter:
    sdk: flutter
  flutter_custom_clippers: ^1.1.2

Step 2
You can install packages from the command line: with Flutter:
flutter pub get

Step 3
Now after adding the dependency and downloading, in order to use any package, we must import it before using it. So, in our case, we will import it in our main.dart file as:
import 'package:flutter_custom_clippers/flutter_custom_clippers.dart';

Flutter Wave Clipper Curved With Login Screen you can add E-mail, 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.

Step 4
YOu Can Add  Wave Clipper Curved With Login Screen Code:
SingleChildScrollView(
  child: Container(
      child: Column(
          children: <Widget>[
            ClipPath(
              clipper: WaveClipperOne(flip: true),
              child: Container(
                height: 200,
                color: Colors.orangeAccent,
                child: Center(
                  child: Text("Login", style: TextStyle(
                    fontWeight: FontWeight.bold,
                    color: Colors.white,
                    fontSize: 40,
                  ),),
                ),
              ),
            ),
            Padding(
                padding: EdgeInsets.all(30.0),
                child: Column(
                  children: <Widget>[
                    Container(
                      padding: EdgeInsets.all(5),
                      child: Column(
                        children: <Widget>[
                          Container(
                            padding: EdgeInsets.all(8.0),
                            child: TextField(
                              decoration: InputDecoration(
                                  hintText: "Email or Phone number",
                                  hintStyle: TextStyle(
                                      color: Colors.grey[500])
                              ),
                            ),
                          ),
                          Container(
                            padding: EdgeInsets.all(8.0),
                            child: TextField(
                              decoration: InputDecoration(
                                  hintText: "Password",
                                  hintStyle: TextStyle(
                                      color: Colors.grey[500])
                              ),
                            ),
                          )
                        ],
                      ),
                    ),
                    SizedBox(height: 30,),
                    Container(
                      height: 50,
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(10),
                          gradient: LinearGradient(
                            begin: Alignment.centerRight,
                        end: Alignment.centerLeft,
                        colors: [Colors.orange[400], Colors.orange[300]]
                          )
                      ),
                      child: Center(
                        child: Text("Sign Up", style: TextStyle(
                            color: Colors.white,
                            fontWeight: FontWeight.bold),),
                      ),
                    ),
                    SizedBox(height: 20,),
                    Container(
                        child: Row(
                          children: <Widget>[
                            Text('Does not have account?'),
                            FlatButton(
                              textColor: Colors.orange[300],
                              child: Text(
                                'Sign in',
                                style: TextStyle(fontSize: 20,),
                              ),
                              onPressed: () {
                                //signup screen
                              },
                            )
                          ],
                          mainAxisAlignment: MainAxisAlignment.center,
                        ))
                  ],
                )
            )
          ]
      )
  ),
)


Complete Code For  Wave Clipper Curved With Login Screen In Flutter
main.dart
import 'package:flutter/material.dart';
import 'package:flutter_custom_clippers/flutter_custom_clippers.dart';


void main() => runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false,
      home: HomePage(),
    )
);

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.white,
        body: SingleChildScrollView(
          child: Container(
              child: Column(
                  children: <Widget>[
                    ClipPath(
                      clipper: WaveClipperOne(flip: true),
                      child: Container(
                        height: 200,
                        color: Colors.orangeAccent,
                        child: Center(
                          child: Text("Login", style: TextStyle(
                            fontWeight: FontWeight.bold,
                            color: Colors.white,
                            fontSize: 40,
                          ),),
                        ),
                      ),
                    ),
                    Padding(
                        padding: EdgeInsets.all(30.0),
                        child: Column(
                          children: <Widget>[
                            Container(
                              padding: EdgeInsets.all(5),
                              child: Column(
                                children: <Widget>[
                                  Container(
                                    padding: EdgeInsets.all(8.0),
                                    child: TextField(
                                      decoration: InputDecoration(
                                          hintText: "Email or Phone number",
                                          hintStyle: TextStyle(
                                              color: Colors.grey[500])
                                      ),
                                    ),
                                  ),
                                  Container(
                                    padding: EdgeInsets.all(8.0),
                                    child: TextField(
                                      decoration: InputDecoration(
                                          hintText: "Password",
                                          hintStyle: TextStyle(
                                              color: Colors.grey[500])
                                      ),
                                    ),
                                  )
                                ],
                              ),
                            ),
                            SizedBox(height: 30,),
                            Container(
                              height: 50,
                              decoration: BoxDecoration(
                                  borderRadius: BorderRadius.circular(10),
                                  gradient: LinearGradient(
                                    begin: Alignment.centerRight,
                                end: Alignment.centerLeft,
                                colors: [Colors.orange[400], Colors.orange[300]]
                                  )
                              ),
                              child: Center(
                                child: Text("Sign Up", style: TextStyle(
                                    color: Colors.white,
                                    fontWeight: FontWeight.bold),),
                              ),
                            ),
                            SizedBox(height: 20,),
                            Container(
                                child: Row(
                                  children: <Widget>[
                                    Text('Does not have account?'),
                                    FlatButton(
                                      textColor: Colors.orange[300],
                                      child: Text(
                                        'Sign in',
                                        style: TextStyle(fontSize: 20,),
                                      ),
                                      onPressed: () {
                                        //signup screen
                                      },
                                    )
                                  ],
                                  mainAxisAlignment: MainAxisAlignment.center,
                                ))
                          ],
                        )
                    )
                  ]
              )
          ),
        )
    );
  }
}

Related Post