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
PPL Sosial
bisago
bisago-fe
Commits
061effe8
Commit
061effe8
authored
May 22, 2021
by
Yoga Pratama
Browse files
[CHORES] Delete duplicate line
parent
e7f00baf
Pipeline
#78258
failed with stages
in 8 minutes and 23 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/get_it.dart
View file @
061effe8
...
...
@@ -37,8 +37,6 @@ class AppGetIt {
()
=
>
KegiatanTerdekatRepository
());
_getIt
.
registerLazySingleton
<
BaseDynamicLinksServiceRepository
>(
()
=
>
DynamicLinksServiceRepository
());
_getIt
.
registerLazySingleton
<
BaseDynamicLinksServiceRepository
>(
()
=
>
DynamicLinksServiceRepository
());
_getIt
.
registerLazySingleton
<
BaseCloudMessagingRepository
>(
()
=
>
CloudMessagingRepository
());
}
...
...
lib/page/dashboard/dashboard.dart
View file @
061effe8
import
'package:bisaGo/bloc/cloud_messaging_bloc.dart'
;
import
'package:bisaGo/bloc/lokasi_response_bloc.dart'
;
import
'package:bisaGo/model/komentar.dart'
;
import
'package:bisaGo/model/lokasi.dart'
;
...
...
@@ -23,6 +24,7 @@ import 'package:bisaGo/component/bisago_drawer.dart';
import
'package:bisaGo/config/styles.dart'
;
import
'package:bisaGo/page/pencarian/pencarian.dart'
;
import
'package:google_maps_webservice/places.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
class
Dashboard
extends
StatefulWidget
{
const
Dashboard
({
Key
key
})
:
super
(
key:
key
);
...
...
@@ -39,6 +41,7 @@ class DashboardState extends State<Dashboard> {
LokasiResponseBloc
bloc
=
LokasiResponseBloc
();
KegiatanTerdekatBloc
blocKegiatanTerdekat
=
KegiatanTerdekatBloc
();
CloudMessagingBloc
cloudMessagingBloc
=
CloudMessagingBloc
();
FirebaseMessaging
_firebaseMessaging
;
...
...
@@ -74,8 +77,13 @@ class DashboardState extends State<Dashboard> {
}
void
_requestFCMToken
()
async
{
final
token
=
await
_firebaseMessaging
.
getToken
();
print
(
token
);
final
fcmToken
=
await
_firebaseMessaging
.
getToken
();
final
sharedPreferences
=
await
SharedPreferences
.
getInstance
();
final
token
=
sharedPreferences
.
getString
(
'token'
);
if
(
token
!=
null
)
{
await
cloudMessagingBloc
.
sendFCMToken
(
fcmToken
,
token
);
}
}
void
_navigateToPencarianPage
(
BuildContext
context
)
{
...
...
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