Hey guys,
I want my button to be at the bottom of the screen but Align does not seem to work
What am I doing wrong
Code:
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Form(
key: formKey,
child: Column(
children: <Widget>[
Image(
image: AssetImage('assets/images/van1.jpg'),
alignment: Alignment.topCenter,
fit: BoxFit.fitWidth,
),
SizedBox(height: 30,),
Padding(
padding: EdgeInsets.only(left: 25.0,right: 25.0),
child: Row(
children:[
Flexible(
flex: 1,
child:Image(
width:30 ,
height: 30,
image:AssetImage('assets/images/Icon feather-user.png')
)
),
Flexible(
child: SizedBox(
width: 30,
),
),
Flexible(
flex: 4,
child: TextFormField(
keyboardType: TextInputType.text,
decoration: InputDecoration(hintText:"Enter your name "),
onChanged: (val){
setState(() {
LoginPage.name=val;
});
},
)
),
]
),
),
SizedBox(height: 30),
Padding(
padding: EdgeInsets.only(left: 25.0,right: 25.0),
child: Row(
children:[
Flexible(
flex: 1,
child:Image(
width: 30,
height: 30,
image:AssetImage('assets/images/phone-number-2.png')
)
),
Flexible(
child: SizedBox(
width: 30,
),
),
Flexible(
flex: 4,
child: TextFormField(
keyboardType: TextInputType.text,
decoration: InputDecoration(hintText:"Enter your phone number "),
onChanged: (val){
setState(() {
LoginPage.phoneNo=val;
});
},
)
),
]
),
),
codeSent?Padding(
padding: EdgeInsets.only(left: 25.0,right: 25.0),
child: TextFormField(
keyboardType: TextInputType.phone,
decoration: InputDecoration(hintText:"Enter OTP"),
onChanged: (val){
setState(() {
this.smsCode=val;
});
},
),
):Container(),
Container(
alignment: Alignment.bottomLeft,
child:Padding(
padding: EdgeInsets.only(left: 25.0,right: 25.0),
child:RaisedButton(
child: Center(
child: codeSent? Text("Verify"):Text("Login"),
),
onPressed: () async{
AuthService.location_logged_in=false;
if(!codeSent)
await verifyPhone(LoginPage.phoneNo);
else {
await AuthService().signInWithOTP(smsCode, verificationId);
if(AuthService.signedIn) {
await Navigator.push(context, new MaterialPageRoute(
builder: (context) => new Timings()));
}
else{
print("NOT SIGNED IN");
}
}
},
),
),
),
],
),
),
);
}