Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2020
PPL-C
DTB-Layanan Fasilitas Publik Penyandang Disabilitas
PoiPoLeGan-PPLapanganTembak-DTB Layanan Fasilitas Publik Penyandang Disabilitas-FE
Commits
82b840a4
Commit
82b840a4
authored
Feb 23, 2020
by
Fakhira Devina
Browse files
[CHORE] pass linter
parent
b32f8cab
Pipeline
#31086
passed with stages
in 9 minutes and 5 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/config/strings.dart
View file @
82b840a4
// Frequently used strings are stored here
// No hardcoding string view files. Store here.
final
String
DEV_BASE_URL
=
"poipole.herokuapp.com"
;
final
String
BASE_URL
=
"poipole.herokuapp.com"
;
String
KEY
=
""
;
String
CSRF
=
""
;
String
SESSION_ID
=
""
;
final
String
devBaseUrl
=
"poipole.herokuapp.com"
;
final
String
baseUrl
=
"poipole.herokuapp.com"
;
String
key
=
""
;
String
csrf
=
""
;
String
sessionId
=
""
;
setKey
(
String
k
ey
)
{
KEY
=
k
ey
;
setKey
(
String
newK
ey
)
{
key
=
newK
ey
;
}
setSessionId
(
String
s
essionId
)
{
SESSION_ID
=
s
essionId
;
setSessionId
(
String
newS
essionId
)
{
sessionId
=
newS
essionId
;
}
\ No newline at end of file
lib/flavor/flavor.dart
View file @
82b840a4
...
...
@@ -7,9 +7,9 @@ class ApiFlavor {
static
String
getBaseUrl
()
{
if
(
ApiFlavor
.
flavor
==
BuildFlavor
.
development
.
toString
())
{
return
DEV_BASE_URL
;
return
devBaseUrl
;
}
else
{
return
BASE_URL
;
return
baseUrl
;
}
}
...
...
lib/main.dart
View file @
82b840a4
import
'package:flutter/material.dart'
;
import
'package:ppl_disabilitas/config/styles.dart'
;
import
'package:ppl_disabilitas/page/dashboard/dashboard.dart'
;
import
'flavor/flavor.dart'
;
...
...
lib/page/dashboard/dashboard.dart
View file @
82b840a4
...
...
@@ -25,9 +25,7 @@ class DashboardState extends State<Dashboard> {
currentLocation
=
cLoc
;
updatePinOnMap
();
});
// set custom marker pins
setSourceAndDestinationIcons
();
// set the initial location
setInitialLocation
();
}
...
...
@@ -88,19 +86,13 @@ class DashboardState extends State<Dashboard> {
}
void
updatePinOnMap
()
async
{
// create a new CameraPosition instance
// every time the location changes, so the camera
// follows the pin as it moves with an animation
CameraPosition
cPosition
=
CameraPosition
(
zoom:
cameraZoom
,
target:
LatLng
(
currentLocation
.
latitude
,
currentLocation
.
longitude
),
);
final
GoogleMapController
controller
=
await
_controller
.
future
;
controller
.
animateCamera
(
CameraUpdate
.
newCameraPosition
(
cPosition
));
// do this inside the setState() so Flutter gets notified
// that a widget update is due
setState
(()
{
// updated position
var
pinPosition
=
LatLng
(
currentLocation
.
latitude
,
currentLocation
.
longitude
);
_markers
.
removeWhere
((
m
)
=>
m
.
markerId
.
value
==
'currentLocationPin'
);
...
...
@@ -112,8 +104,6 @@ class DashboardState extends State<Dashboard> {
}
void
setInitialLocation
()
async
{
// set the initial location by pulling the user's
// current location from the location's getLocation()
currentLocation
=
await
location
.
getLocation
();
}
}
test/widget_test.dart
View file @
82b840a4
import
'dart:async'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:google_maps_flutter/google_maps_flutter.dart'
;
...
...
Write
Preview
Supports
Markdown
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