Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
AStAPrint Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AStA
AStAPrint Admin
Commits
09beb524
Commit
09beb524
authored
3 years ago
by
Leon Tappe
🔥
Browse files
Options
Downloads
Patches
Plain Diff
do not let drawer appbar scroll
parent
cf1b0a57
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/pages/root_page.dart
+3
-0
3 additions, 0 deletions
lib/pages/root_page.dart
lib/widgets/drawer/drawer.dart
+69
-64
69 additions, 64 deletions
lib/widgets/drawer/drawer.dart
with
72 additions
and
64 deletions
lib/pages/root_page.dart
+
3
−
0
View file @
09beb524
...
...
@@ -78,16 +78,19 @@ class _RootPageState extends State<RootPage> {
return
FadeRoute
(
builder:
(
BuildContext
context
)
=
>
PrinterDetailsPage
(
printer:
args
.
printer
),
settings:
settings
,
);
}
else
if
(
settings
.
name
==
UserDetailsPage
.
routeName
)
{
final
args
=
settings
.
arguments
as
UserDetailsArguments
;
return
FadeRoute
(
builder:
(
BuildContext
context
)
=
>
UserDetailsPage
(
user:
args
.
user
),
settings:
settings
,
);
}
else
if
(
settings
.
name
==
AdminDetailsPage
.
routeName
)
{
final
args
=
settings
.
arguments
as
AdminDetailsArguments
;
return
FadeRoute
(
builder:
(
BuildContext
context
)
=
>
AdminDetailsPage
(
admin:
args
.
admin
),
settings:
settings
,
);
}
else
{
return
FadeRoute
(
builder:
routes
[
settings
.
name
],
settings:
settings
);
...
...
This diff is collapsed.
Click to expand it.
lib/widgets/drawer/drawer.dart
+
69
−
64
View file @
09beb524
...
...
@@ -16,73 +16,78 @@ class MainDrawer extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
final
AuthBloc
authBloc
=
BlocProvider
.
of
<
AuthBloc
>(
context
);
return
Drawer
(
child:
ListView
(
padding:
EdgeInsets
.
zero
,
children:
<
Widget
>[
AppBar
(),
drawer
.
DrawerHeader
(),
ListTile
(
title:
Text
(
'Dashboard'
),
trailing:
Icon
(
Icons
.
dashboard_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
DashboardPage
.
routeName
)),
ListTile
(
title:
Text
(
'Benutzer'
),
trailing:
Icon
(
Icons
.
person_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
UserListPage
.
routeName
),
),
ListTile
(
title:
Text
(
'Drucker'
),
trailing:
Icon
(
Icons
.
print_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
PrinterListPage
.
routeName
),
),
ListTile
(
title:
Text
(
'Transaktionen'
),
trailing:
Icon
(
Icons
.
history_edu_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
JournalListPage
.
routeName
),
),
ListTile
(
title:
Text
(
'Dokumentenverarbeitung'
),
trailing:
Icon
(
Icons
.
task_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
DispatcherListPage
.
routeName
),
),
ListTile
(
title:
Text
(
'Admins'
),
trailing:
Icon
(
Icons
.
supervised_user_circle_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
AdminListPage
.
routeName
),
),
Divider
(),
ListTile
(
title:
Text
(
'Über'
),
trailing:
Icon
(
Icons
.
help
),
onTap:
()
async
{
PackageInfo
packageInfo
=
await
PackageInfo
.
fromPlatform
();
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
AboutDialog
(
applicationName:
'AStAPrint Admin'
,
applicationVersion:
'
${packageInfo.version}
+
${packageInfo.buildNumber}
'
,
applicationLegalese:
'© AStA Paderborn 2022'
,
child:
Column
(
children:
[
AppBar
(),
Expanded
(
child:
ListView
(
padding:
EdgeInsets
.
zero
,
children:
<
Widget
>[
drawer
.
DrawerHeader
(),
ListTile
(
title:
Text
(
'Dashboard'
),
trailing:
Icon
(
Icons
.
dashboard_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
DashboardPage
.
routeName
)),
ListTile
(
title:
Text
(
'Benutzer'
),
trailing:
Icon
(
Icons
.
person_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
UserListPage
.
routeName
),
),
ListTile
(
title:
Text
(
'Drucker'
),
trailing:
Icon
(
Icons
.
print_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
PrinterListPage
.
routeName
),
),
ListTile
(
title:
Text
(
'Transaktionen'
),
trailing:
Icon
(
Icons
.
history_edu_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
JournalListPage
.
routeName
),
),
ListTile
(
title:
Text
(
'Dokumentenverarbeitung'
),
trailing:
Icon
(
Icons
.
task_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
DispatcherListPage
.
routeName
),
),
ListTile
(
title:
Text
(
'Admins'
),
trailing:
Icon
(
Icons
.
supervised_user_circle_rounded
),
onTap:
()
=
>
_popAndPushNamed
(
AdminListPage
.
routeName
),
),
Divider
(),
ListTile
(
title:
Text
(
'Über'
),
trailing:
Icon
(
Icons
.
help
),
onTap:
()
async
{
PackageInfo
packageInfo
=
await
PackageInfo
.
fromPlatform
();
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
AboutDialog
(
applicationName:
'AStAPrint Admin'
,
applicationVersion:
'
${packageInfo.version}
+
${packageInfo.buildNumber}
'
,
applicationLegalese:
'© AStA Paderborn 2022'
,
);
},
);
},
)
;
}
,
),
Divider
(
),
ListTile
(
title:
Text
(
'Logout'
),
trailing:
Icon
(
Icons
.
exit_to_app
),
onTap:
()
async
{
authBloc
.
logout
();
(
await
SharedPreferences
.
getInstance
())
.
.
remove
(
'token'
)
.
.
remove
(
'username'
);
Navigator
.
of
(
navigatorKey
.
currentContext
)
.
popUntil
(
ModalRoute
.
withName
(
'/'
));
}
,
)
,
Divider
()
,
ListTile
(
title:
Text
(
'Logout'
),
trailing:
Icon
(
Icons
.
exit_to_app
),
onTap:
()
async
{
authBloc
.
logout
();
(
await
SharedPreferences
.
getInstance
())
.
.
remove
(
'token'
)
.
.
remove
(
'username'
);
Navigator
.
of
(
navigatorKey
.
currentContext
)
.
popUntil
(
ModalRoute
.
withName
(
'/'
));
},
),
]
,
),
]
,
)
,
);
)
,
]
,
)
);
}
void
_popAndPushNamed
(
String
name
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment