Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
library-app-flutter
Project
Project
Details
Activity
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
Ilham Maulana
library-app-flutter
Commits
2b66dff3
Commit
2b66dff3
authored
Aug 06, 2024
by
Ilham Maulana
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: pop routing
parent
6ab0290f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
15 deletions
+16
-15
form_screen.dart
lib/src/screens/form_screen.dart
+4
-2
profile_edit_screen.dart
lib/src/screens/profile_edit_screen.dart
+1
-1
profile_edit_form.dart
lib/src/widgets/forms/profile_edit_form.dart
+0
-11
profile.dart
lib/src/widgets/profile.dart
+11
-1
No files found.
lib/src/screens/form_screen.dart
View file @
2b66dff3
...
...
@@ -41,7 +41,9 @@ class _FormScreen extends State<FormScreen> {
title:
Text
(
title
),
leading:
withBack
?
BackButton
(
onPressed:
()
=>
context
.
push
(
backRoute
??
""
),
onPressed:
()
=>
backRoute
!=
null
?
context
.
push
(
backRoute
!)
:
context
.
pop
(),
)
:
null
,
actions:
action
,
...
...
@@ -99,7 +101,7 @@ class ChangePasswordScreen extends StatelessWidget {
return
FormScreen
(
title:
title
,
backRoute:
"/profile-edit"
,
backRoute:
null
,
body:
const
ChangePasswordForm
(),
);
}
...
...
lib/src/screens/profile_edit_screen.dart
View file @
2b66dff3
...
...
@@ -18,7 +18,7 @@ class ProfileEditScreen extends StatelessWidget {
appBar:
AppBar
(
title:
Text
(
title
),
leading:
BackButton
(
onPressed:
()
=>
context
.
p
ush
(
"/"
),
onPressed:
()
=>
context
.
p
op
(
),
),
),
body:
Consumer
<
AuthProvider
>(
...
...
lib/src/widgets/forms/profile_edit_form.dart
View file @
2b66dff3
import
'package:flutter/material.dart'
;
import
'package:go_router/go_router.dart'
;
import
'package:library_app/src/providers/auth_provider.dart'
;
import
'package:library_app/src/models/user.dart'
;
...
...
@@ -120,16 +119,6 @@ class _ProfileEditForm extends State<ProfileEditForm> {
),
),
),
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
10.0
),
child:
SizedBox
(
width:
double
.
infinity
,
child:
ElevatedButton
(
onPressed:
()
=>
context
.
go
(
"/change-password"
),
child:
const
Text
(
"Change Password"
),
),
),
)
],
),
),
...
...
lib/src/widgets/profile.dart
View file @
2b66dff3
...
...
@@ -78,15 +78,25 @@ class _Profile extends State<Profile> {
textAlign:
TextAlign
.
center
,
),
),
const
SizedBox
(
height:
10.0
,
),
FilledButton
(
child:
const
Text
(
"Edit Profile"
),
onPressed:
()
{
context
.
go
(
"/profile-edit"
);
context
.
push
(
"/profile-edit"
);
},
),
const
SizedBox
(
height:
10.0
,
),
ElevatedButton
(
onPressed:
()
=>
context
.
push
(
"/change-password"
),
child:
const
Text
(
"Change Password"
),
),
const
SizedBox
(
height:
10.0
,
),
OutlinedButton
(
child:
const
Text
(
"Log Out"
),
onPressed:
()
{
...
...
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