Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull to refresh feature with UI changed #175

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/components/hike_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ class HikeButton extends StatelessWidget {

@override
Widget build(BuildContext context) {
final Size screensize = MediaQuery.of(context).size;
return ElevatedButton(
style: ElevatedButton.styleFrom(
primary: buttonColor,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(50.0),
side: BorderSide(color: borderColor)),
borderRadius: new BorderRadius.circular(screensize.width),
Rushour0 marked this conversation as resolved.
Show resolved Hide resolved
side: BorderSide(
color: borderColor,
),
),
),
child: Padding(
padding: EdgeInsets.symmetric(
Expand Down
199 changes: 108 additions & 91 deletions lib/views/auth_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,83 +202,88 @@ class _AuthScreenState extends State<AuthScreen>
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Card(
elevation: 2.0,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
child: Form(
key: model.formKeyLogin,
autovalidateMode: model.loginValidate,
child: Container(
width: screensize.width - 70,
child: Column(
children: <Widget>[
Container(
height: 13.h,
padding: EdgeInsets.symmetric(
horizontal: 10, vertical: 10.0),
child: TextFormField(
autovalidateMode: model.loginValidate,
focusNode: model.emailLogin,
controller: model.loginEmailController,
validator: (value) =>
Validator.validateEmail(value.trimRight()),
keyboardType: TextInputType.emailAddress,
style: TextStyle(fontSize: 16.0, color: Colors.black),
decoration: InputDecoration(
border: InputBorder.none,
icon: Icon(
Icons.mail_outline,
color: Colors.black,
size: 24.0,
),
hintText: "Email Address",
hintStyle: TextStyle(
fontSize: hintsize - 2, color: hintColor),
Form(
key: model.formKeyLogin,
autovalidateMode: model.loginValidate,
child: Wrap(
children: [
Card(
elevation: 5.0,
Rushour0 marked this conversation as resolved.
Show resolved Hide resolved
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(screensize.width / 20),
),
child: Container(
// height: 13.h,
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: TextFormField(
autovalidateMode: model.loginValidate,
focusNode: model.emailLogin,
controller: model.loginEmailController,
validator: (value) =>
Validator.validateEmail(value.trimRight()),
keyboardType: TextInputType.emailAddress,
style: TextStyle(fontSize: 16.0, color: Colors.black),
decoration: InputDecoration(
border: InputBorder.none,
icon: Icon(
Icons.mail_outline,
color: Colors.black,
size: 24.0,
),
hintText: "Email Address",
hintStyle: TextStyle(
fontSize: hintsize - 2, color: hintColor),
),
),
separator(),
Container(
height: 13.h,
padding: EdgeInsets.symmetric(
horizontal: 10, vertical: 10.0),
child: TextFormField(
autovalidateMode: model.loginValidate,
focusNode: model.passwordLogin,
controller: model.loginPasswordController,
obscureText: model.obscureTextLogin,
validator: (value) =>
Validator.validatePassword(value),
style: TextStyle(fontSize: 16.0, color: Colors.black),
decoration: InputDecoration(
border: InputBorder.none,
),
),
Card(
elevation: 5.0,
Rushour0 marked this conversation as resolved.
Show resolved Hide resolved
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(screensize.width / 20),
),
child: Container(
padding:
EdgeInsets.symmetric(horizontal: 10, vertical: 10.0),
child: TextFormField(
autovalidateMode: model.loginValidate,
focusNode: model.passwordLogin,
controller: model.loginPasswordController,
obscureText: model.obscureTextLogin,
validator: (value) => Validator.validatePassword(value),
style: TextStyle(fontSize: 16.0, color: Colors.black),
decoration: InputDecoration(
border: InputBorder.none,
icon: Icon(
Icons.lock,
size: 24.0,
color: Colors.black,
),
hintText: "Password",
hintStyle: TextStyle(
fontSize: hintsize - 2, color: hintColor),
suffixIcon: IconButton(
onPressed: () => model.displayPasswordLogin(),
icon: Icon(
Icons.lock,
size: 24.0,
model.obscureTextLogin
? Icons.visibility
: Icons.visibility_off,
size: 20.0,
color: Colors.black,
),
hintText: "Password",
hintStyle: TextStyle(
fontSize: hintsize - 2, color: hintColor),
suffixIcon: IconButton(
onPressed: () => model.displayPasswordLogin(),
icon: Icon(
model.obscureTextLogin
? Icons.visibility
: Icons.visibility_off,
size: 20.0,
color: Colors.black,
),
),
),
),
),
],
),
),
),
],
),
),
SizedBox(
Expand All @@ -292,7 +297,7 @@ class _AuthScreenState extends State<AuthScreen>
padding: EdgeInsets.only(
left: 15.0, right: 15.0, top: 15.0, bottom: 15.0),
child: Text(
"Or",
"OR",
style: TextStyle(
color: Colors.black,
fontSize: 16.0,
Expand All @@ -316,21 +321,21 @@ class _AuthScreenState extends State<AuthScreen>
padding: EdgeInsets.only(top: 3.h, left: 8.5.w, right: 8.5.w),
child: Column(
children: <Widget>[
Card(
elevation: 2.0,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
child: Form(
key: model.formKeySignup,
autovalidateMode: model.signupValidate,
child: Container(
width: screensize.width - 70,
// height: 280.0,
child: Column(children: <Widget>[
Container(
height: 13.h,
Form(
Rushour0 marked this conversation as resolved.
Show resolved Hide resolved
key: model.formKeySignup,
autovalidateMode: model.signupValidate,
child: Container(
width: screensize.width - 70,
// height: 280.0,
child: Column(children: <Widget>[
Card(
elevation: 5,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(screensize.width / 20),
),
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10, vertical: 10.0),
child: TextFormField(
Expand All @@ -355,9 +360,15 @@ class _AuthScreenState extends State<AuthScreen>
),
),
),
separator(),
Container(
height: 13.h,
),
Card(
elevation: 5,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(screensize.width / 20),
),
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10, vertical: 10.0),
child: TextFormField(
Expand All @@ -381,9 +392,15 @@ class _AuthScreenState extends State<AuthScreen>
),
),
),
separator(),
Container(
height: 13.h,
),
Card(
elevation: 5,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(screensize.width / 20),
),
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10, vertical: 10.0),
child: TextFormField(
Expand Down Expand Up @@ -418,8 +435,8 @@ class _AuthScreenState extends State<AuthScreen>
),
),
),
])),
),
),
])),
),
SizedBox(
height: 3.5.h,
Expand Down
Loading