This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[google_maps_flutter] Add Google maps flutter platform interface #2577
Closed
cylyl
wants to merge
48
commits into
flutter:master
from
cylyl:google_maps_flutter_platform_interface
Closed
Changes from 40 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
5a7a89a
add google_maps_flutter_platform_interface
cylyl 910c6ae
removed unused_local_variable
cylyl 5afbe02
format
cylyl 4c0ac1f
format
cylyl 5276fbc
format#
cylyl 9c35d4c
update CHANGELOG
cylyl 0d99e15
Move MethodChannel code to MethodChannelGoogleMapsFlutter
cylyl 152bd4a
Update dependencies
cylyl 6c2a92c
add buildView method
cylyl 73d23a2
update pubspec
cylyl 25099ab
bugs fix
cylyl cf190ef
Some adjustments to the PR.
ditman ae0c68d
dartfmt -w .
ditman 35798fa
Expose the MethodChannel so e2e tests are happy.
ditman c43d0aa
Move platform into src so we can create a barrel file to export stuff.
ditman fc9ba91
Create barrel file to export only certain things from src
ditman 3228de6
Adjust imports in platform interface
ditman 4b630d6
Move LatLng and LagLngBounds to the platform interface package. Reexp…
ditman fdb4329
Move ui.dart to platform_interface. Expose .toJson so it can be used …
ditman 56c1873
Move Polygon and Polyline, and all the related types.
ditman 39c4bd6
Move Circle and Marker files to platform_interface.
ditman a35d82f
Move callbacks, camera and screen cordinate to platform interface. Ex…
ditman 7d9b1b8
Adapt controller and map widget to new API. Expose _toX methods as to…
ditman b745850
dartfmt -w .
ditman 45d386d
Use EntityUpdate classes in the corresponding platform interface
ditman 364c829
Modify the platform interface in methods that return map boundaries to
ditman e879738
Utilize MarkerId instances instead of Strings in the relevant methods.
ditman 8eb9371
Return futures from the platform directly, no need to await for those.
ditman be832c9
Make mapId a mandatory parameter on the interface methods.
ditman faf9b97
Add the 11 native event Streams to the platform interface.
ditman 425299d
Connect to the streams coming from the platform interface.
ditman 551c47f
Ensure the streams are of the right type.
ditman e810234
Use stream_transform package to get the whereType extension.
ditman ba72342
Final vars should be final
ditman b2547b5
dartfmt -w .
ditman e133351
Rename test according to what it tests.
ditman 69dcf5b
buildView document
cylyl c8ca414
Move CameraPositionCallback to the platform interface
ditman fbc3b3e
Move takeSnapshot to platform_interface.
ditman 95af9f0
Set google_maps_flutter_platform_interface version to 1.0.0
ditman 63f5d0d
Revert changes to the example.
ditman 99346d6
Remove .gitignore from example dir
ditman f5a6013
Appease the analyzer.
ditman 545500b
Appease analyze some more.
ditman 609200f
Rename _controller to _mapEventStreamController
ditman a3efd0f
Update some docs on the platform
ditman 98e0952
Document MapEvent constructors.
ditman 5057b0a
Document method_channel class
ditman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
packages/google_maps_flutter/google_maps_flutter/example/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Miscellaneous | ||
| *.class | ||
| *.log | ||
| *.pyc | ||
| *.swp | ||
| .DS_Store | ||
| .atom/ | ||
| .buildlog/ | ||
| .history | ||
| .svn/ | ||
|
|
||
| # IntelliJ related | ||
| *.iml | ||
| *.ipr | ||
| *.iws | ||
| .idea/ | ||
|
|
||
| # The .vscode folder contains launch configuration and tasks you configure in | ||
| # VS Code which you may wish to be included in version control, so this line | ||
| # is commented out by default. | ||
| #.vscode/ | ||
|
|
||
| # Flutter/Dart/Pub related | ||
| **/doc/api/ | ||
| .dart_tool/ | ||
| .flutter-plugins | ||
| .flutter-plugins-dependencies | ||
| .packages | ||
| .pub-cache/ | ||
| .pub/ | ||
| /build/ | ||
|
|
||
| # Web related | ||
| lib/generated_plugin_registrant.dart | ||
|
|
||
| # Symbolication related | ||
| app.*.symbols | ||
|
|
||
| # Exceptions to above rules. | ||
| !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages | ||
7 changes: 7 additions & 0 deletions
7
packages/google_maps_flutter/google_maps_flutter/example/android/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| gradle-wrapper.jar | ||
| /.gradle | ||
| /captures/ | ||
| /gradlew | ||
| /gradlew.bat | ||
| /local.properties | ||
| GeneratedPluginRegistrant.java |
12 changes: 12 additions & 0 deletions
12
...ps_flutter/example/android/app/src/main/kotlin/io/flutter/plugins/example/MainActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package io.flutter.plugins.example | ||
ditman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| import androidx.annotation.NonNull; | ||
| import io.flutter.embedding.android.FlutterActivity | ||
| import io.flutter.embedding.engine.FlutterEngine | ||
| import io.flutter.plugins.GeneratedPluginRegistrant | ||
|
|
||
| class MainActivity: FlutterActivity() { | ||
| override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { | ||
| GeneratedPluginRegistrant.registerWith(flutterEngine); | ||
| } | ||
| } | ||
32 changes: 32 additions & 0 deletions
32
packages/google_maps_flutter/google_maps_flutter/example/ios/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| *.mode1v3 | ||
ditman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ditman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| *.mode2v3 | ||
| *.moved-aside | ||
| *.pbxuser | ||
| *.perspectivev3 | ||
| **/*sync/ | ||
| .sconsign.dblite | ||
| .tags* | ||
| **/.vagrant/ | ||
| **/DerivedData/ | ||
| Icon? | ||
| **/Pods/ | ||
| **/.symlinks/ | ||
| profile | ||
| xcuserdata | ||
| **/.generated/ | ||
| Flutter/App.framework | ||
| Flutter/Flutter.framework | ||
| Flutter/Flutter.podspec | ||
| Flutter/Generated.xcconfig | ||
| Flutter/app.flx | ||
| Flutter/app.zip | ||
| Flutter/flutter_assets/ | ||
| Flutter/flutter_export_environment.sh | ||
| ServiceDefinitions.json | ||
| Runner/GeneratedPluginRegistrant.* | ||
|
|
||
| # Exceptions to above rules. | ||
| !default.mode1v3 | ||
| !default.mode2v3 | ||
| !default.pbxuser | ||
| !default.perspectivev3 | ||
8 changes: 8 additions & 0 deletions
8
...er/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
ditman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>IDEDidComputeMac32BitWarning</key> | ||
| <true/> | ||
| </dict> | ||
| </plist> | ||
8 changes: 8 additions & 0 deletions
8
...xample/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>PreviewsEnabled</key> | ||
| <false/> | ||
| </dict> | ||
| </plist> |
8 changes: 8 additions & 0 deletions
8
.../google_maps_flutter/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>IDEDidComputeMac32BitWarning</key> | ||
| <true/> | ||
| </dict> | ||
| </plist> |
8 changes: 8 additions & 0 deletions
8
...gle_maps_flutter/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>PreviewsEnabled</key> | ||
| <false/> | ||
| </dict> | ||
| </plist> |
13 changes: 13 additions & 0 deletions
13
packages/google_maps_flutter/google_maps_flutter/example/ios/Runner/AppDelegate.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import UIKit | ||
ditman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| import Flutter | ||
|
|
||
| @UIApplicationMain | ||
| @objc class AppDelegate: FlutterAppDelegate { | ||
| override func application( | ||
| _ application: UIApplication, | ||
| didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | ||
| ) -> Bool { | ||
| GeneratedPluginRegistrant.register(with: self) | ||
| return super.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
| } | ||
| } | ||
1 change: 1 addition & 0 deletions
1
packages/google_maps_flutter/google_maps_flutter/example/ios/Runner/Runner-Bridging-Header.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #import "GeneratedPluginRegistrant.h" | ||
ditman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+917 Bytes
packages/google_maps_flutter/google_maps_flutter/example/web/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.17 KB
packages/google_maps_flutter/google_maps_flutter/example/web/icons/Icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.06 KB
packages/google_maps_flutter/google_maps_flutter/example/web/icons/Icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions
35
packages/google_maps_flutter/google_maps_flutter/example/web/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta content="IE=Edge" http-equiv="X-UA-Compatible"> | ||
| <meta name="description" content="A new Flutter project."> | ||
|
|
||
| <!-- iOS meta tags & icons --> | ||
| <meta name="apple-mobile-web-app-capable" content="yes"> | ||
| <meta name="apple-mobile-web-app-status-bar-style" content="black"> | ||
| <meta name="apple-mobile-web-app-title" content="example"> | ||
| <link rel="apple-touch-icon" href="/icons/Icon-192.png"> | ||
|
|
||
| <!-- Favicon --> | ||
| <link rel="shortcut icon" type="image/png" href="/favicon.png"/> | ||
|
|
||
| <title>example</title> | ||
| <link rel="manifest" href="/manifest.json"> | ||
| </head> | ||
| <body> | ||
| <!-- This script installs service_worker.js to provide PWA functionality to | ||
| application. For more information, see: | ||
| https://developers.google.com/web/fundamentals/primers/service-workers --> | ||
| <script> | ||
| if ('serviceWorker' in navigator) { | ||
| window.addEventListener('load', function () { | ||
| navigator.serviceWorker.register('/flutter_service_worker.js'); | ||
| }); | ||
| } | ||
| </script> | ||
| <script src="main.dart.js" type="application/javascript"></script> | ||
| <script src="http://maps.googleapis.com/maps/api/js?key=API_KEY"></script> | ||
| <script defer src="page.dart.js"></script> | ||
| </body> | ||
| </html> |
23 changes: 23 additions & 0 deletions
23
packages/google_maps_flutter/google_maps_flutter/example/web/manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "name": "example", | ||
| "short_name": "example", | ||
| "start_url": ".", | ||
| "display": "minimal-ui", | ||
| "background_color": "#0175C2", | ||
| "theme_color": "#0175C2", | ||
| "description": "A new Flutter project.", | ||
| "orientation": "portrait-primary", | ||
| "prefer_related_applications": false, | ||
| "icons": [ | ||
| { | ||
| "src": "icons/Icon-192.png", | ||
| "sizes": "192x192", | ||
| "type": "image/png" | ||
| }, | ||
| { | ||
| "src": "icons/Icon-512.png", | ||
| "sizes": "512x512", | ||
| "type": "image/png" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.