Fakultas Ilmu Komputer UI

Commit 82b840a4 authored by Fakhira Devina's avatar Fakhira Devina
Browse files

[CHORE] pass linter

parent b32f8cab
Pipeline #31086 passed with stages
in 9 minutes and 5 seconds
// 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 key) {
KEY = key;
setKey(String newKey) {
key = newKey;
}
setSessionId(String sessionId) {
SESSION_ID = sessionId;
setSessionId(String newSessionId) {
sessionId = newSessionId;
}
\ No newline at end of file
......@@ -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;
}
}
......
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/config/styles.dart';
import 'package:ppl_disabilitas/page/dashboard/dashboard.dart';
import 'flavor/flavor.dart';
......
......@@ -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();
}
}
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment