Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #29 from prakharb10/dev
Browse files Browse the repository at this point in the history
v1.0.8
  • Loading branch information
prakharb10 authored Aug 7, 2020
2 parents 366e76c + ec301b6 commit e10809f
Show file tree
Hide file tree
Showing 7 changed files with 406 additions and 369 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# wiki_app

A new Flutter project.
A wiki app.

## Getting Started

Expand Down
1 change: 1 addition & 0 deletions lib/ForgotPass.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class _ForgotPassState extends State<ForgotPass> {
autovalidate: true,
key: _formKey2,
child: TextFormField(
autofillHints: [AutofillHints.email],
validator: validateEmail,
focusNode: _focusNodeEmail2,
controller: _forgotemailController,
Expand Down
234 changes: 119 additions & 115 deletions lib/LoginPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class _LoginPageState extends State<LoginPage> {
email: _email, password: _password);
FirebaseUser user = result.user;
FirebaseAnalytics().logLogin(loginMethod: 'EmailAndPassword');
FirebaseAnalytics().setUserId(user.uid);
_error = 'Welcome back,' + user.displayName.toString() + '!';
Navigator.of(context).pop();
//Navigator.of(context).pushReplacementNamed('/home');
Expand Down Expand Up @@ -136,128 +137,131 @@ class _LoginPageState extends State<LoginPage> {
),
textAlign: TextAlign.left,
),
Form(
autovalidate: _autoValidate,
key: _formKey,
child: Column(
children: <Widget>[
Padding(
padding:
const EdgeInsets.fromLTRB(20.0, 25.0, 20.0, 10.0),
child: TextFormField(
focusNode: _focusNodeEmail,
controller: _emailController,
validator: validateEmail,
obscureText: false,
maxLines: 1,
autovalidate: false,
enableSuggestions: true,
toolbarOptions:
ToolbarOptions(paste: true, selectAll: true),
textCapitalization: TextCapitalization.none,
cursorColor: const Color(0xff253a4b),
keyboardType: TextInputType.emailAddress,
decoration: InputDecoration(
filled: true,
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(25.0),
),
fillColor: const Color(0x25253a4b),
hintText: 'Email',
prefixIcon: Icon(
Icons.email,
color: const Color(0xfff23b5f),
AutofillGroup(
child: Form(
autovalidate: _autoValidate,
key: _formKey,
child: Column(
children: <Widget>[
Padding(
padding:
const EdgeInsets.fromLTRB(20.0, 25.0, 20.0, 10.0),
child: TextFormField(
autofillHints: [AutofillHints.email],
focusNode: _focusNodeEmail,
controller: _emailController,
validator: validateEmail,
obscureText: false,
maxLines: 1,
autovalidate: false,
enableSuggestions: true,
toolbarOptions:
ToolbarOptions(paste: true, selectAll: true),
textCapitalization: TextCapitalization.none,
cursorColor: const Color(0xff253a4b),
keyboardType: TextInputType.emailAddress,
decoration: InputDecoration(
filled: true,
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(25.0),
),
fillColor: const Color(0x25253a4b),
hintText: 'Email',
prefixIcon: Icon(
Icons.email,
color: const Color(0xfff23b5f),
),
suffixIcon: _sufIC(_focusNodeEmail),
),
suffixIcon: _sufIC(_focusNodeEmail),
textInputAction: TextInputAction.next,
onFieldSubmitted: (value) => FocusScope.of(context)
.requestFocus(_focusNodePass),
onChanged: (value) {
setState(() {
_emailController.text.isEmpty
? _isEmpty = true
: _isEmpty = false;
});
},
onTap: () {
setState(() {
_emailController.text.isEmpty
? _isEmpty = true
: _isEmpty = false;
});
},
onEditingComplete: () {
setState(() {
_emailController.text.isEmpty
? _isEmpty = true
: _isEmpty = false;
});
},
onSaved: (newValue) => _email = newValue,
),
textInputAction: TextInputAction.next,
onFieldSubmitted: (value) =>
FocusScope.of(context).requestFocus(_focusNodePass),
onChanged: (value) {
setState(() {
_emailController.text.isEmpty
? _isEmpty = true
: _isEmpty = false;
});
},
onTap: () {
setState(() {
_emailController.text.isEmpty
? _isEmpty = true
: _isEmpty = false;
});
},
onEditingComplete: () {
setState(() {
_emailController.text.isEmpty
? _isEmpty = true
: _isEmpty = false;
});
},
onSaved: (newValue) => _email = newValue,
),
),
Padding(
padding:
const EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: TextFormField(
focusNode: _focusNodePass,
controller: _passController,
obscureText: _isObscured,
validator: validatePassword,
maxLines: 1,
autovalidate: false,
enableSuggestions: false,
toolbarOptions: ToolbarOptions(
paste: false,
selectAll: true,
copy: false,
cut: false,
),
textCapitalization: TextCapitalization.none,
cursorColor: const Color(0xff253a4b),
keyboardType: TextInputType.visiblePassword,
decoration: InputDecoration(
filled: true,
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(25.0),
Padding(
padding:
const EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: TextFormField(
autofillHints: [AutofillHints.password],
focusNode: _focusNodePass,
controller: _passController,
obscureText: _isObscured,
maxLines: 1,
autovalidate: false,
enableSuggestions: false,
toolbarOptions: ToolbarOptions(
paste: false,
selectAll: true,
copy: false,
cut: false,
),
fillColor: const Color(0x25253a4b),
hintText: 'Password',
prefixIcon: Icon(
Icons.lock,
color: const Color(0xfff23b5f),
textCapitalization: TextCapitalization.none,
cursorColor: const Color(0xff253a4b),
keyboardType: TextInputType.visiblePassword,
decoration: InputDecoration(
filled: true,
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(25.0),
),
fillColor: const Color(0x25253a4b),
hintText: 'Password',
prefixIcon: Icon(
Icons.lock,
color: const Color(0xfff23b5f),
),
suffixIcon: _isFilled
? IconButton(
icon: Icon(
_isObscured
? Icons.visibility_off
: Icons.visibility,
color: const Color(0xfff23b5f),
),
onPressed: () {
setState(() {
_isObscured = !_isObscured;
});
},
)
: null,
),
suffixIcon: _isFilled
? IconButton(
icon: Icon(
_isObscured
? Icons.visibility_off
: Icons.visibility,
color: const Color(0xfff23b5f),
),
onPressed: () {
setState(() {
_isObscured = !_isObscured;
});
},
)
: null,
textInputAction: TextInputAction.done,
onChanged: (value) {
setState(() {
_passController.text.isEmpty
? _isFilled = false
: _isFilled = true;
});
},
onSaved: (value) => _password = value,
),
textInputAction: TextInputAction.done,
onChanged: (value) {
setState(() {
_passController.text.isEmpty
? _isFilled = false
: _isFilled = true;
});
},
onSaved: (value) => _password = value,
),
),
],
],
),
),
),
Padding(
Expand Down
Loading

0 comments on commit e10809f

Please sign in to comment.