Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
IT Project 2020
Group B
pilar-mobile
Commits
1497d4aa
Commit
1497d4aa
authored
Nov 24, 2020
by
Tsamara Esperanti Erwin
Browse files
[CHORES] Clean code
parent
070f1c29
Pipeline
#61129
passed with stages
in 27 minutes and 22 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/Component/router.dart
View file @
1497d4aa
...
...
@@ -155,7 +155,7 @@ class Router {
RepositoryProvider
.
of
<
DependenciesRepositories
>(
context
)
.
dio
),
child:
Programs
()
child:
const
Programs
()
));
case
detailProgramPage:
...
...
lib/Pages/Program/bloc_program/program_bloc.dart
View file @
1497d4aa
...
...
@@ -60,7 +60,7 @@ class ProgramBloc extends Bloc<ProgramEvent, ProgramState> {
}
}
else
if
((
event
is
FetchProgramByStatus
)
&&
!
_hasReachedMaxSorted
(
currentState
))
{
try
{
var
programs
=
final
programs
=
await
programRepository
.
fetchProgram
(
page:
currentState
.
page
+
1
);
if
(
currentState
is
ListProgramsLoaded
||
currentState
is
InitialListProgramState
)
{
programs
.
results
.
sort
((
a
,
b
)
=
>
b
.
endDateTime
.
compareTo
(
a
.
endDateTime
));
...
...
lib/Pages/Program/program_page.dart
View file @
1497d4aa
...
...
@@ -69,17 +69,17 @@ class _ProgramsState extends State<Programs> {
),
),
bottomNavigationBar:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
25.0
),
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
25.0
),
child:
Wrap
(
children:
[
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
20
),
const
Padding
(
padding:
EdgeInsets
.
only
(
top:
20
),
child:
Text
(
'Urutkan Berdasarkan:'
,
style:
TextStyle
(
fontSize:
16.0
),),
),
GestureDetector
(
onTap:
()
{
setState
(()
{
programList
=
_ListProgramSortStatus
();
programList
=
const
_ListProgramSortStatus
();
});
},
child:
FilterButton
(
sort:
'Status'
)
...
...
@@ -87,7 +87,7 @@ class _ProgramsState extends State<Programs> {
GestureDetector
(
onTap:
()
{
setState
(()
{
programList
=
_ListProgram
();
programList
=
const
_ListProgram
();
});
},
child:
FilterButton
(
sort:
'Tanggal'
)
...
...
@@ -336,7 +336,7 @@ class ProgramCard extends StatelessWidget {
class
_ProgramDescription
extends
StatelessWidget
{
final
Program
program
;
_ProgramDescription
({
Key
key
,
@required
this
.
program
})
const
_ProgramDescription
({
Key
key
,
@required
this
.
program
})
:
assert
(
program
!=
null
),
super
(
key:
key
);
...
...
@@ -383,7 +383,7 @@ class _ProgramDescription extends StatelessWidget {
),
if
(
program
.
endDateTime
!=
null
&&
program
.
endDateTime
.
compareTo
(
CustomizableDateTime
.
current
)
<
1
)
Text
(
const
Text
(
'Selesai'
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
),
)
...
...
@@ -429,7 +429,9 @@ class _DonasiButton extends StatelessWidget {
class
FilterButton
extends
StatelessWidget
{
final
String
sort
;
FilterButton
({
Key
key
,
@required
this
.
sort
});
FilterButton
({
Key
key
,
@required
this
.
sort
})
:
assert
(
sort
!=
null
),
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -442,7 +444,7 @@ class FilterButton extends StatelessWidget {
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
10.0
),
child:
Text
(
sort
,
style:
TextStyle
(
color:
Colors
.
white
),
style:
const
TextStyle
(
color:
Colors
.
white
),
),
),
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment