import 'package:flutter/material.dart'; class ClipLogin10 extends StatefulWidget { const ClipLogin10({Key? key}) : super(key: key); @override State createState() => _ClipLogin10State(); } class _ClipLogin10State extends State { @override Widget build(BuildContext context) { Size screenSize=MediaQuery.of(context).size; const myColor=Colors.cyan; return Scaffold( backgroundColor: Colors.black, body: SingleChildScrollView( child: Stack( children: [ ClipPath( clipper: MyClipper3(), child: Container(height: screenSize.height,width: screenSize.width, decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.center, end: Alignment.bottomCenter, colors: [ Colors.black, Colors.black, myColor.shade400, ] ) ),), ), ClipPath( clipper: MyClipper2(), child: Container(height: screenSize.height,width: screenSize.width, decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.center, end: Alignment.topCenter, colors: [ Colors.black, Colors.black, myColor.shade700, myColor.shade400, ] ) ), ), ), // ClipPath( // clipper: MyClipper1(), // child: Container(height: screenSize.height/2,width: screenSize.width,color:myColor.shade400 ,), // ), Container( margin: EdgeInsets.only(top: screenSize.height/10,left: screenSize.width*.1), alignment: Alignment.centerLeft, child: Text('Welcome',style: TextStyle( color: Colors.white,fontSize: 40, shadows: [ Shadow( color: Colors.black.withOpacity(0.5), offset: const Offset(0, 5), blurRadius: 10 ) ] ),), ), Container( alignment: Alignment.center, margin: EdgeInsets.only(top: screenSize.height*.3), child: Text('Sign In',style: TextStyle( color: myColor,fontSize: 35,fontWeight: FontWeight.bold ),), ), Container( padding: EdgeInsets.only(top: screenSize.height*0.35,left: 30,right: 30,bottom: 20), child: Container( child: Column( children: [ Padding( padding: EdgeInsets.only(top: 20,left: 20,right: 20), child: Column( children: [ TextFormField( scrollPadding: EdgeInsets.only(bottom:MediaQuery.of(context).viewInsets.bottom), decoration: InputDecoration( filled: true , fillColor: Colors.white, labelText: 'Email', labelStyle: TextStyle(color: myColor), ), ), const SizedBox(height: 15,), TextFormField( obscureText: true , scrollPadding: EdgeInsets.only(bottom:MediaQuery.of(context).viewInsets.bottom), decoration: InputDecoration( filled: true , fillColor: Colors.white, labelText: 'Password', labelStyle: TextStyle(color: myColor), ), ), const SizedBox(height: 15,), Container( margin: const EdgeInsets.only(right: 20), alignment: Alignment.centerRight, child: const Text('Forgot Password?',style: TextStyle(color: Colors.blue),)), const SizedBox(height: 15,), Container( width: double.infinity, decoration: BoxDecoration(borderRadius: BorderRadius.circular(30)), child: ElevatedButton( onPressed: (){}, child: const Text('Sign In',style: TextStyle(color: myColor,fontSize: 25),), style: ElevatedButton.styleFrom( padding: const EdgeInsets.symmetric(horizontal: 50,vertical: 15), backgroundColor: Colors.white, ), ), ), const SizedBox(height: 15), Text("Don't have an account?",style: TextStyle(color: Colors.white),), SizedBox(width: 8,), Text('Register',style: TextStyle( color: Colors.blue, decoration: TextDecoration.underline,) ), SizedBox(height: 20,) ] ), ), ], ), ), ) ], ), ), ); } } class MyClipper1 extends CustomClipper{ @override Path getClip(Size size) { Path path =Path(); path.lineTo(0, 0); path.quadraticBezierTo(size.width/8, size.height*0.4, size.width/8*3, size.height/2.1); path.quadraticBezierTo(size.width/8*4, size.height/2.9, size.width/8*5, size.height/2.6); path.quadraticBezierTo(size.width/8*7, size.height/2, size.width,0); return path; } @override bool shouldReclip(covariant CustomClipper oldClipper) { return true; } } class MyClipper2 extends CustomClipper{ @override Path getClip(Size size) { Path path =Path(); path.lineTo(0, size.height*.3); path.quadraticBezierTo(size.width/8*7, size.height*.1, size.width/8*3, size.height*.3); path.quadraticBezierTo(size.width/8*7, size.height*.1, size.width, size.height*.25); //path.quadraticBezierTo(size.width/8*3, size.height/2.5, size.width/8*4, size.height/2.2); //path.quadraticBezierTo(size.width/8*6, size.height/1.7, size.width, size.height/2.2); path.lineTo(size.width, 0); return path; } @override bool shouldReclip(covariant CustomClipper oldClipper) { return true; } } class MyClipper3 extends CustomClipper{ @override Path getClip(Size size) { Path path =Path(); path.moveTo(0, size.height); path.lineTo(0, size.height*.85); path.quadraticBezierTo(size.width/7.5, size.height*.95, size.width/8*5,size.height*.77); path.quadraticBezierTo(size.width/7.5, size.height*.95, size.width,size.height*.77); path.lineTo(size.width, size.height); //path.quadraticBezierTo(size.width/8*3, size.height/2.5, size.width/8*4, size.height/2.2); //path.quadraticBezierTo(size.width/8*6, size.height/1.7, size.width, size.height/2.2); //path.lineTo(size.width, 0); return path; } @override bool shouldReclip(covariant CustomClipper oldClipper) { return true; } }