Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
onTime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
onTime InnoLab
onTime
Commits
ae9905e7
Commit
ae9905e7
authored
1 year ago
by
doodlezucc
Browse files
Options
Downloads
Patches
Plain Diff
display drawer regardless of classes fetch state
parent
bdfdddae
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/drawer/drawer.dart
+5
-2
5 additions, 2 deletions
lib/drawer/drawer.dart
lib/main.dart
+1
-3
1 addition, 3 deletions
lib/main.dart
with
6 additions
and
5 deletions
lib/drawer/drawer.dart
+
5
−
2
View file @
ae9905e7
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'../context.dart'
;
import
'../context.dart'
;
import
'../untis/class.dart'
;
import
'class_list_item.dart'
;
import
'class_list_item.dart'
;
class
ClassDrawer
extends
StatefulWidget
{
class
ClassDrawer
extends
StatefulWidget
{
...
@@ -13,6 +14,8 @@ class ClassDrawer extends StatefulWidget {
...
@@ -13,6 +14,8 @@ class ClassDrawer extends StatefulWidget {
}
}
class
_ClassDrawerState
extends
State
<
ClassDrawer
>
{
class
_ClassDrawerState
extends
State
<
ClassDrawer
>
{
List
<
Class
>
get
availableClasses
=
>
widget
.
appContext
.
classes
??
[];
@override
@override
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
...
@@ -30,10 +33,10 @@ class _ClassDrawerState extends State<ClassDrawer> {
...
@@ -30,10 +33,10 @@ class _ClassDrawerState extends State<ClassDrawer> {
return
Drawer
(
return
Drawer
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
final
cls
=
widget
.
appContext
.
c
lasses
!
.
elementAt
(
index
);
final
cls
=
availableC
lasses
.
elementAt
(
index
);
return
ClassListItem
(
cls:
cls
,
appContext:
widget
.
appContext
);
return
ClassListItem
(
cls:
cls
,
appContext:
widget
.
appContext
);
},
},
itemCount:
widget
.
appContext
.
c
lasses
!
.
length
,
itemCount:
availableC
lasses
.
length
,
),
),
);
);
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/main.dart
+
1
−
3
View file @
ae9905e7
...
@@ -123,9 +123,7 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -123,9 +123,7 @@ class _MyHomePageState extends State<MyHomePage> {
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
appName
),
title:
const
Text
(
appName
),
),
),
drawer:
appContext
.
profile
.
value
==
null
drawer:
ClassDrawer
(
appContext:
appContext
),
?
null
:
ClassDrawer
(
appContext:
appContext
),
body:
Column
(
body:
Column
(
children:
[
children:
[
Toolbar
(
appContext:
appContext
),
Toolbar
(
appContext:
appContext
),
...
...
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