@override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Stack( clipBehavior: Clip.none, children: [ Positioned( left: 0, right: 0, child: Container( height: 350, decoration: const BoxDecoration( gradient: LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topRight,
colors: [
Color.fromRGBO(5,25,55 ,1.0),
Color.fromRGBO( 22 ,94 ,115, 1.0)
// Color.fromRGBO(22 ,94 ,115,1.0),
// Color.fromRGBO(56, 146, 157,1.0),
// Color.fromRGBO(73, 171, 177,0.5),
// Color.fromRGBO(5, 117, 230, 1.0),
// Color.fromRGBO(2, 27, 121, 1.0)
])),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
CircleAvatar(
radius: 65.0,
backgroundColor: Colors.white,
child: Image.asset(
'assets/logo symbol.png',
width: 120,
height: 120,
),
),
],
)),
),
Positioned(
top: 300,
left: 20,
right: 20,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white),
boxShadow: [
BoxShadow(
color: Colors.black,
blurRadius: 10.0,
spreadRadius: 1.0),
BoxShadow(
color: Colors.black, blurRadius: 0.0, spreadRadius: 0.0)
],
borderRadius: BorderRadius.circular(10.0)),
child: Column(
children: [
SizedBox(
height: 20,
),
Text(
"Login",
style: TextStyle(
fontFamily: 'Mulish-Semibold',
fontSize: 25,
letterSpacing: 1.5,
fontWeight: FontWeight.w500),
),
SizedBox(
height: 30,
),
customTextBox("Enter Your Email", Icons.person,
TextInputType.emailAddress,
false
),
const SizedBox(
height: 10,
),
customTextBox("Enter Your Password", Icons.lock,
TextInputType.visiblePassword ,
true
),
const SizedBox(
height: 60,
)
],
),
),
),
Positioned(
left: MediaQuery.of(context).size.width/3.5,
top: 570,
child: InkWell(
child: Row(
children: [
Container(
padding:
const EdgeInsets.only(left: 50, right: 50, top: 15, bottom: 15),
decoration: BoxDecoration(
color: Color.fromRGBO(22,94,115,1.0),
borderRadius: BorderRadius.circular(30)),
child: const Text(
'Login',
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontFamily: 'Mulish',
fontWeight: FontWeight.normal),
),
),
],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const UpdateScreen()));
},
))
],
),
));
}
Widget customTextBox(String hint, IconData icons,TextInputType keyboardtype,bool obscuretext) { Size size = MediaQuery.of(context).size; return Container( padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 5), margin: const EdgeInsets.symmetric(vertical: 12), width: size.width * 0.8, decoration: BoxDecoration( color: const Color.fromRGBO(217, 217, 217, 1.0), borderRadius: BorderRadius.circular(12)), child: TextFormField( keyboardType: keyboardtype, decoration: InputDecoration( hintText: hint, icon: Icon(icons, color: Color.fromRGBO( 22 ,94 ,115, 1.0)), border: InputBorder.none), obscureText: obscuretext, ), height: 50, ); } }
To Make Work SingleChildScrollabel View