diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 592a2ce..df78b3b 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -31,5 +31,7 @@
+
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 4b322f3..1d34060 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -7,6 +7,14 @@ PODS:
- FMDB/standard (2.7.5)
- geolocator_apple (1.2.0):
- Flutter
+ - google_maps_flutter (0.0.1):
+ - Flutter
+ - GoogleMaps
+ - GoogleMaps (4.1.0):
+ - GoogleMaps/Maps (= 4.1.0)
+ - GoogleMaps/Base (4.1.0)
+ - GoogleMaps/Maps (4.1.0):
+ - GoogleMaps/Base
- image_picker (0.0.1):
- Flutter
- path_provider_ios (0.0.1):
@@ -23,6 +31,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_compass (from `.symlinks/plugins/flutter_compass/ios`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
+ - google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
@@ -32,6 +41,7 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- FMDB
+ - GoogleMaps
EXTERNAL SOURCES:
Flutter:
@@ -40,6 +50,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_compass/ios"
geolocator_apple:
:path: ".symlinks/plugins/geolocator_apple/ios"
+ google_maps_flutter:
+ :path: ".symlinks/plugins/google_maps_flutter/ios"
image_picker:
:path: ".symlinks/plugins/image_picker/ios"
path_provider_ios:
@@ -56,6 +68,8 @@ SPEC CHECKSUMS:
flutter_compass: cbbd285cea1584c7ac9c4e0c3e1f17cbea55e855
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
+ google_maps_flutter: c59fc576c0d0c7f4dc4bd63832c862d22d5a7c6d
+ GoogleMaps: 008e2c80e38605b56b560e8deb73d4194ff30bef
image_picker: 541dcbb3b9cf32d87eacbd957845d8651d6c62c3
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 5acdf5c..624c1c2 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -140,6 +140,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
8340085CA329EF510409EEF4 /* [CP] Embed Pods Frameworks */,
+ 98C3810C530EA7CF0B7CC3E0 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -265,6 +266,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
+ 98C3810C530EA7CF0B7CC3E0 /* [CP] Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Copy Pods Resources";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
index 3763683..6f55dc6 100644
--- a/ios/Runner/AppDelegate.swift
+++ b/ios/Runner/AppDelegate.swift
@@ -1,5 +1,6 @@
import UIKit
import Flutter
+import GoogleMaps
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@@ -7,6 +8,7 @@ import Flutter
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
+ GMSServices.provideAPIKey("AIzaSyBLgnwft3py6c4YkT-MxZ9y4zYGFgAEmRk")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 3a32b4a..f595daf 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -2,6 +2,8 @@
+ io.flutter.embedded_views_preview
+
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleDisplayName
diff --git a/lib/pages/destination/destination_controller.dart b/lib/pages/destination/destination_controller.dart
index a25327c..1f6718b 100644
--- a/lib/pages/destination/destination_controller.dart
+++ b/lib/pages/destination/destination_controller.dart
@@ -5,11 +5,13 @@ import 'package:get/get.dart';
import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/routes/app_pages.dart';
import 'package:rogapp/services/destination_service.dart';
+import 'package:rogapp/services/maxtrix_service.dart';
class DestinationController extends GetxController {
List destinations = [].obs;
+ Map matrix = {};
final IndexController indexController = Get.find();
@@ -24,8 +26,16 @@ class DestinationController extends GetxController {
int user_id = indexController.currentUser[0]["user"]["id"] as int;
//print(user_id);
DestinationService.getDestinations(user_id).then((value){
- destinations.clear();
- destinations = value;
+
+ MatrixService.getDestinations(value).then((mat){
+ print(mat);
+ matrix = mat;
+
+ destinations.clear();
+ destinations = value;
+
+ });
+
//var val = value[2]["location"]["id"];
//print("-----current destinations ----- ${val}");
});
diff --git a/lib/pages/destination/destination_page.dart b/lib/pages/destination/destination_page.dart
index 35fe570..f32b922 100644
--- a/lib/pages/destination/destination_page.dart
+++ b/lib/pages/destination/destination_page.dart
@@ -110,8 +110,8 @@ class _DestinationPageState extends State {
startChild: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
- Text("12:30"),
- Text("01:20"),
+ Text(destinationController.matrix["rows"][0]["elements"][index]["distance"]["text"].toString()),
+ Text(destinationController.matrix["rows"][0]["elements"][index]["duration"]["text"].toString())
],
),
);
diff --git a/lib/pages/index/index_controller.dart b/lib/pages/index/index_controller.dart
index 4a9b70c..4116660 100644
--- a/lib/pages/index/index_controller.dart
+++ b/lib/pages/index/index_controller.dart
@@ -1,5 +1,8 @@
+import 'dart:async';
+
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
+import 'package:flutter_map/plugin_api.dart';
import 'package:geojson/geojson.dart';
import 'package:get/get.dart';
import 'package:latlong2/latlong.dart';
@@ -22,7 +25,6 @@ class IndexController extends GetxController {
List