-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add web support to place_tracker #550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…fixes a grey screen issue in web, after saving a place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Thanks for publishing this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than one nit and one question. 😄
place_tracker/.gitignore
Outdated
@@ -69,3 +69,6 @@ | |||
!**/ios/**/default.pbxuser | |||
!**/ios/**/default.perspectivev3 | |||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages | |||
|
|||
# Flutter Web files | |||
lib/generated_plugin_registrant.dart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: restore newline.
@@ -414,11 +429,13 @@ class PlaceMapState extends State<PlaceMap> { | |||
switch (category) { | |||
case PlaceCategory.favorite: | |||
return BitmapDescriptor.fromAssetImage( | |||
createLocalImageConfiguration(context), 'assets/heart.png'); | |||
createLocalImageConfiguration(context, size: Size.square(32)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll miss those enormous blue flags. 😄
|
||
<!-- // Other stuff --> | ||
|
||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBEKgpAdjMVMv9IKX-BBsjzwgYMxfZonbw"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the key intended to be in here? We don't ship the app with the mobile API keys, which is why I'm asking. Even if this one isn't as "secret" as the mobile versions, it might be better to disassociate the app from any one account and update the README to tell people where to stick their own key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I would do that, but If we take it out, we can't deploy it to http://flutter.github.io/samples anymore.
We could consider writing this string as part of the samples index deployment (perhaps via an environment variable given to a GitHub action.) but the API key is still visible if you view the source of the page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a section to the README for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted my previous comment because I just stated the obvious (again) xD
This adds web support to place_tracker. (google_maps_flutter_web was added in flutter/plugins#2933 and is on pub now.)
To use build/test for web, you still need to be on the beta, dev, or master channel, but I don't think we need to move into the experimental/ directory in this case, since this app still works on the stable channel on iOS and Android.
FYI @ditman