Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 5

void _userPasswordBottomSheet(BuildContext context) {

showModalBottomSheet(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top:
Radius.circular(25.0))),
backgroundColor: Colors.transparent,
isScrollControlled: true,
isDismissible: true,
useRootNavigator: true,
enableDrag: true,
context: context,
builder: (BuildContext context) {
return Padding(
padding: MediaQuery.of(context).viewInsets,
child: Container(
height: MediaQuery.of(context).size.height * .35,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8),
child: SingleChildScrollView(

child: Column(

children: <Widget>[

Container(
height: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
gradient: LinearGradient(colors: [
kThemeColor3,
kThemeColor3,
])),
child: Column(children: <Widget>[
SizedBox(
height: 20,
),
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.only(
left: 10.0, right: 10.0),
child: TextFormField(
validator: (value) {
if (value.isEmpty) {
return 'Email Required';
}
return null;
},
keyboardType: TextInputType.name,
style: TextStyle(
color: Colors.black, fontSize: 17),
cursorColor: Colors.black,
controller: _userEmailAddress,
decoration: InputDecoration(
contentPadding:
EdgeInsets.fromLTRB(
20.0, 15.0, 20.0, 15.0),
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.circular(32.0),
borderSide: BorderSide(
color: Colors.blue)),
enabledBorder: OutlineInputBorder(
borderRadius:
BorderRadius.circular(32.0),
borderSide: BorderSide(
color: kThemeColor2)),
icon: Icon(Icons.email,
color: kThemeColor2),
hintText:
"something@example.com",
hintStyle: TextStyle(
color: Colors.pink,
fontSize: 17)),
),
),
),
],
),
SizedBox(
height: 20,
),
Text(
"NOTE: Reset link will be sent to your
email",
style: TextStyle(
color: Colors.black45,
fontSize: 12.0,
),
),
])),

SizedBox(
height: 9,
),
Container(
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
gradient: LinearGradient(colors: [
kThemeColor3,
kThemeColor3,
])),
child: MaterialButton(
onPressed: () async {
Navigator.of(context).pop();

setState(() {
_showSpinner = true;
});

resetPassword(context);
},
child: Center(
child: Text(
"Submit",
style: TextStyle(
color: kThemeColor2,
fontSize: 17.0,
),
),
),
)),
],
),
)),
),
);
},
);
}

You might also like