Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
medapp_eksad
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qorri_di
medapp_eksad
Commits
afdcae7d
Commit
afdcae7d
authored
Sep 26, 2022
by
Tohap Maruli Pasaribu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/qorridi/medapp_eksad
into develop
parents
44bae067
e18fa4d4
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
154 additions
and
102 deletions
+154
-102
forget_password.dart
lib/auth/forget_password.dart
+58
-30
homepage.dart
lib/homepage.dart
+1
-1
about_us.dart
lib/screen/about_us.dart
+1
-1
footer.dart
lib/screen/footer.dart
+93
-69
home_user.dart
lib/screen_user/home_user.dart
+1
-1
No files found.
lib/auth/forget_password.dart
View file @
afdcae7d
...
...
@@ -3,6 +3,7 @@ import 'dart:convert';
import
'package:firebase_auth/firebase_auth.dart'
;
import
'package:flutter/material.dart'
;
import
'package:form_field_validator/form_field_validator.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:http/http.dart'
as
http
;
import
'package:medapp_eksad/firebase/showSnackbar_Alertdialog.dart'
;
import
'package:medapp_eksad/widget/button_color.dart'
;
...
...
@@ -27,6 +28,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
@override
Widget
build
(
BuildContext
context
)
{
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Stack
(
children:
[
Container
(
...
...
@@ -45,38 +47,64 @@ class _ForgotPasswordState extends State<ForgotPassword> {
),
Center
(
child:
AlertDialog
(
title:
Text
(
'Receive an email
\n
to reset your password.'
,
textAlign:
TextAlign
.
center
,),
content:
Form
(
key:
formKey
,
child:
TextFormField
(
textAlign:
TextAlign
.
start
,
controller:
emailController
,
textInputAction:
TextInputAction
.
done
,
autovalidateMode:
AutovalidateMode
.
onUserInteraction
,
validator:
(
email
)
=>
email
!=
null
&&
EmailValidator
(
errorText:
'Enter a valid email'
).
isValid
(
email
)
?
"Enter a valid email"
:
null
,
decoration:
InputDecoration
(
labelText:
"Enter your email address"
,
hintStyle:
const
TextStyle
(),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5.0
)),
),
// onChanged: (value) => email = value,
title:
Text
(
'Reset Password'
,
textAlign:
TextAlign
.
center
,),
content:
Container
(
width:
screenSize
.
width
*
0.25
,
height:
screenSize
.
height
*
0.3
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceAround
,
children:
[
Form
(
key:
formKey
,
child:
TextFormField
(
textAlign:
TextAlign
.
start
,
controller:
emailController
,
textInputAction:
TextInputAction
.
done
,
//autovalidateMode: AutovalidateMode.onUserInteraction,
decoration:
InputDecoration
(
labelText:
"Enter your email address"
,
hintStyle:
const
TextStyle
(),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5.0
)),
),
validator:
(
value
)
{
if
(
value
==
null
||
value
.
isEmpty
)
{
return
'Please enter your email address'
;
}
return
null
;
},
// onChanged: (value) => email = value,
),
),
Container
(
height:
screenSize
.
height
*
0.1
,
child:
Text
(
'We will send you an email with'
' a link to reset your password, please enter the email'
' associated with your account above.'
,
style:
GoogleFonts
.
poppins
(
fontSize:
12
),),),
Container
(
width:
screenSize
.
width
*
0.31
,
height:
screenSize
.
height
*
0.065
,
child:
ElevatedButton
(
onPressed:
()
async
{
if
(
formKey
.
currentState
!.
validate
())
{
await
resetPassword
();
return
;
}
},
// resetPassword();
// //Navigator.pushNamed(context, 'dashboard');
// },
child:
const
Text
(
'Send'
),),
)
],
),
),
actions:
<
Widget
>[
TextButton
(
onPressed:
()
{
resetPassword
();
//Navigator.pushNamed(context, 'dashboard');
},
child:
const
Text
(
'Send'
),
),
],
)),
),
),
],
);
}
...
...
@@ -90,7 +118,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
}
on
FirebaseAuthException
catch
(
e
){
print
(
e
);
showSnackBar
(
context
,
e
.
message
.
toString
()
);
showSnackBar
Error
(
context
,
e
.
message
!
);
Navigator
.
of
(
context
).
pop
();
}
}
...
...
lib/homepage.dart
View file @
afdcae7d
...
...
@@ -63,7 +63,7 @@ class _HomePageState extends State<HomePage> {
const
Home3
(),
const
Home4
(),
ContactUs2
(),
const
Footer
(),
Footer
(),
],
),
);
...
...
lib/screen/about_us.dart
View file @
afdcae7d
...
...
@@ -63,7 +63,7 @@ class _AboutUsState extends State<AboutUs> {
const
Home3
(),
const
Home4
(),
ContactUs2
(),
const
Footer
(),
Footer
(),
],
),
);
...
...
lib/screen/footer.dart
View file @
afdcae7d
This diff is collapsed.
Click to expand it.
lib/screen_user/home_user.dart
View file @
afdcae7d
...
...
@@ -63,7 +63,7 @@ class _HomePageUserState extends State<HomePageUser> {
const
Home3
(),
const
Home4
(),
ContactUs2
(),
const
Footer
(),
Footer
(),
],
),
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment