Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
2be2c232
Commit
2be2c232
authored
Mar 11, 2021
by
Manuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added AppBar for logout
parent
663b2342
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
2 deletions
+48
-2
communitygraph.dart
src/dashboard/lib/graphing/communitygraph.dart
+2
-0
main.dart
src/dashboard/lib/main.dart
+1
-1
credentials.dart
src/dashboard/lib/ui/sign_in/credentials.dart
+0
-0
login_form.dart
src/dashboard/lib/ui/sign_in/login_form.dart
+0
-0
loginpage.dart
src/dashboard/lib/ui/sign_in/loginpage.dart
+1
-1
logged_in_appbar.dart
src/dashboard/lib/ui/util/logged_in_appbar.dart
+44
-0
No files found.
src/dashboard/lib/graphing/communitygraph.dart
View file @
2be2c232
import
'package:circlegraph/circlegraph.dart'
;
import
'package:dashboard/querying/datagetter.dart'
;
import
'package:dashboard/ui/util/logged_in_appbar.dart'
;
import
'package:enhanced_future_builder/enhanced_future_builder.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
...
...
@@ -102,6 +103,7 @@ class CommunityGraphViewPage extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
LoggedInAppBar
(),
backgroundColor:
Colors
.
white
,
floatingActionButton:
FloatingActionButton
(
onPressed:
()
=>
redirectToCommunityMetaGraph
(
context
),
...
...
src/dashboard/lib/main.dart
View file @
2be2c232
import
'package:dashboard/exceptions/login_exception.dart'
;
import
'package:dashboard/graphing/communitygraph.dart'
;
import
'package:dashboard/loading.dart'
;
import
'package:dashboard/sign_in/loginpage.dart'
;
import
'package:dashboard/
ui/
sign_in/loginpage.dart'
;
import
'package:dashboard/util/loginhelper.dart'
;
import
'package:dashboard/util/user.dart'
;
import
'package:enhanced_future_builder/enhanced_future_builder.dart'
;
...
...
src/dashboard/lib/sign_in/credentials.dart
→
src/dashboard/lib/
ui/
sign_in/credentials.dart
View file @
2be2c232
File moved
src/dashboard/lib/sign_in/login_form.dart
→
src/dashboard/lib/
ui/
sign_in/login_form.dart
View file @
2be2c232
File moved
src/dashboard/lib/sign_in/loginpage.dart
→
src/dashboard/lib/
ui/
sign_in/loginpage.dart
View file @
2be2c232
import
'package:dashboard/exceptions/login_exception.dart'
;
import
'package:dashboard/main.dart'
;
import
'package:dashboard/sign_in/login_form.dart'
;
import
'package:dashboard/
ui/
sign_in/login_form.dart'
;
import
'package:dashboard/util/loginhelper.dart'
;
import
'package:dashboard/util/user.dart'
;
import
'package:flutter/cupertino.dart'
;
...
...
src/dashboard/lib/ui/util/logged_in_appbar.dart
0 → 100644
View file @
2be2c232
import
'package:dashboard/main.dart'
;
import
'package:dashboard/util/loginhelper.dart'
;
import
'package:flutter/material.dart'
;
class
LoggedInAppBar
extends
PreferredSize
{
@override
Size
get
preferredSize
=>
Size
.
fromHeight
(
60
);
Future
<
void
>
_onLogout
(
context
)
async
{
await
LoginHelper
().
logout
();
Navigator
.
of
(
context
).
pushReplacement
(
MaterialPageRoute
(
builder:
(
context
)
=>
MyApp
(),
),
);
}
@override
Widget
build
(
BuildContext
context
)
{
return
AppBar
(
backgroundColor:
Colors
.
blue
,
actions:
[
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
TextButton
.
icon
(
onPressed:
()
=>
_onLogout
(
context
),
icon:
Icon
(
Icons
.
logout
,
color:
Colors
.
white
,
size:
25
,
),
label:
Text
(
"Logout"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
20
,
),
),
),
),
],
);
}
}
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