Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
5e80090
My location button and my location fixes
otopba Jul 6, 2019
fe6327e
Bump version
otopba Jul 6, 2019
bacb116
Fix format
otopba Jul 6, 2019
511e504
Merge branch 'master' into my-location-button-fixes
otopba Jul 12, 2019
d48e03f
Update CHANGELOG
collinjackson Jul 24, 2019
98293d8
Remove unrelated file
collinjackson Jul 24, 2019
9aacc82
Add `isMyLocationEnabled` support with test.
collinjackson Jul 25, 2019
a78f3e1
fix format
otopba Jul 26, 2019
073fca5
Merge pull request #1 from flutter/master
otopba Jul 26, 2019
9476376
Merge branch 'master' into my-location-button-fixes
otopba Jul 26, 2019
6063035
Update authors
otopba Jul 26, 2019
b139041
final vars
otopba Jul 26, 2019
bb12418
Merge pull request #2 from flutter/master
otopba Aug 6, 2019
ca8aa5e
Merge branch 'master' into my-location-button-fixes
otopba Aug 6, 2019
45b417e
version: 0.5.21
otopba Aug 6, 2019
a03ee88
Merge pull request #3 from flutter/master
otopba Aug 31, 2019
a809939
Merge branch 'master' into my-location-button-fixes
otopba Aug 31, 2019
29e2e66
fixes
otopba Sep 8, 2019
e2613e0
Merge pull request #4 from flutter/master
otopba Sep 11, 2019
07b2b29
Merge branch 'master' into my-location-button-fixes
otopba Sep 11, 2019
1c98d10
Merge pull request #5 from flutter/master
otopba Sep 16, 2019
2064485
Merge branch 'master' into my-location-button-fixes
otopba Sep 16, 2019
b50c88e
Merge pull request #6 from flutter/master
otopba Sep 20, 2019
8fc1a69
Merge branches 'master' and 'my-location-button-fixes' of github.com:…
otopba Sep 20, 2019
ce695b1
Merge pull request #7 from flutter/master
otopba Sep 25, 2019
9d27e9d
Merge branch 'master' into my-location-button-fixes
otopba Sep 25, 2019
58192f4
Merge pull request #8 from flutter/master
otopba Oct 6, 2019
1aaf1c1
Merge branch 'master' into my-location-button-fixes
otopba Oct 6, 2019
485a419
Merge pull request #9 from flutter/master
otopba Nov 2, 2019
815973b
Merge branch 'master' into my-location-button-fixes
otopba Nov 2, 2019
dde8df7
Merge pull request #10 from flutter/master
otopba Nov 12, 2019
33ed689
Merge pull request #11 from flutter/master
otopba Nov 29, 2019
7ec3707
Merge remote-tracking branch 'upstream/master'
otopba Dec 8, 2019
f056c49
Merge remote-tracking branch 'upstream/master'
otopba Dec 11, 2019
ab1d5bc
Merge remote-tracking branch 'upstream/master'
otopba Dec 19, 2019
e4a6011
Merge remote-tracking branch 'upstream/master'
otopba Jan 7, 2020
fb15656
Merge remote-tracking branch 'upstream/master'
otopba Jan 19, 2020
2f2d7dd
Merge branch 'master' into my-location-button-fixes
otopba Jan 19, 2020
ab77709
format
otopba Jan 19, 2020
596184c
Merge remote-tracking branch 'upstream/master'
otopba Jan 21, 2020
e038a3e
Add dummy map initialization
otopba Jan 21, 2020
4345ed5
Revert "Add dummy map initialization"
otopba Jan 21, 2020
ee302c1
Merge remote-tracking branch 'upstream/master'
otopba Jan 23, 2020
97598ab
Merge remote-tracking branch 'upstream/master'
otopba Jan 29, 2020
4c8d45a
Merge remote-tracking branch 'upstream/master'
otopba Feb 1, 2020
2236fef
Merge branch 'master' into my-location-button-fixes
otopba Feb 1, 2020
0af73b6
merge
otopba Feb 1, 2020
7039a40
Add todo
otopba Feb 1, 2020
49e510f
format
otopba Feb 1, 2020
c267dca
Merge remote-tracking branch 'upstream/master'
otopba Feb 24, 2020
590a5c3
Merge branch 'master' into my-location-button-fixes
otopba Feb 24, 2020
4816227
Merge remote-tracking branch 'upstream/master'
otopba Mar 19, 2020
bb4e5be
Merge remote-tracking branch 'upstream/master'
otopba Mar 22, 2020
4d431bf
Merge branch 'master' into my-location-button-fixes
otopba Mar 22, 2020
d4bfe37
merge
otopba Mar 22, 2020
0a86ebc
Merge remote-tracking branch 'upstream/master'
otopba Apr 30, 2020
6cd64da
Merge remote-tracking branch 'upstream/master'
otopba May 15, 2020
133f90e
Merge branch 'master' into my-location-button-fixes
otopba May 15, 2020
9c0090e
Merge remote-tracking branch 'upstream/master'
otopba Aug 20, 2020
b79938a
Merge remote-tracking branch 'upstream/master'
otopba Sep 14, 2020
46c9bc9
Merge remote-tracking branch 'plugins/master'
neokree Oct 12, 2020
f621d70
Merge pull request #13 from flutter/master
otopba Oct 26, 2020
8e0d4a6
Merge remote-tracking branch 'upstream/master'
otopba Nov 1, 2020
c4ab426
Merge remote-tracking branch 'origin/master'
otopba Nov 1, 2020
92c2398
Merge remote-tracking branch 'origin/master' into my-location-button-…
otopba Nov 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Debkanchan Samadder <[email protected]>
Audrius Karosevicius <[email protected]>
Lukasz Piliszczuk <[email protected]>
SoundReply Solutions GmbH <[email protected]>
Iurii Dorofeev <[email protected]>
Rafal Wachol <[email protected]>
Pau Picas <[email protected]>
Christian Weder <[email protected]>
Expand Down
5 changes: 5 additions & 0 deletions packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.6

* Fix references to `myLocationButtonEnabled` in test and example app.
* Added `isMyLocationEnabled` to `GoogleMapsInspector`.

## 1.0.5

Overhaul lifecycle management in GoogleMapsPlugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ public void onSnapshotReady(Bitmap bitmap) {
result.success(googleMap.getUiSettings().isRotateGesturesEnabled());
break;
}
case "map#isMyLocationEnabled":
{
result.success(googleMap.isMyLocationEnabled());
break;
}
case "map#isMyLocationButtonEnabled":
{
result.success(googleMap.getUiSettings().isMyLocationButtonEnabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ class GoogleMapInspector {
return await _channel.invokeMethod<bool>('map#isScrollGesturesEnabled');
}

Future<bool> isMyLocationEnabled() async {
return await _channel.invokeMethod<bool>('map#isMyLocationEnabled');
}

Future<bool> isMyLocationButtonEnabled() async {
return await _channel.invokeMethod<bool>('map#isMyLocationButtonEnabled');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,57 @@ void main() {
expect(secondVisibleRegion.contains(newCenter), isTrue);
});

testWidgets('testMyLocation', (WidgetTester tester) async {
final Key key = GlobalKey();
final Completer<GoogleMapInspector> inspectorCompleter =
Completer<GoogleMapInspector>();

await tester.pumpWidget(Directionality(
textDirection: TextDirection.ltr,
child: GoogleMap(
key: key,
initialCameraPosition: _kInitialCameraPosition,
myLocationEnabled: true,
myLocationButtonEnabled: true,
onMapCreated: (GoogleMapController controller) {
final GoogleMapInspector inspector =
// ignore: invalid_use_of_visible_for_testing_member
GoogleMapInspector(controller.channel);
inspectorCompleter.complete(inspector);
},
),
));

GoogleMapInspector inspector = await inspectorCompleter.future;
bool myLocationEnabled = await inspector.isMyLocationEnabled();
expect(myLocationEnabled, true);
bool myLocationButtonEnabled = await inspector.isMyLocationButtonEnabled();
expect(myLocationButtonEnabled, true);

await tester.pumpWidget(Directionality(
textDirection: TextDirection.ltr,
child: GoogleMap(
key: key,
initialCameraPosition: _kInitialCameraPosition,
myLocationEnabled: false,
myLocationButtonEnabled: false,
onMapCreated: (GoogleMapController controller) {
final GoogleMapInspector inspector =
// ignore: invalid_use_of_visible_for_testing_member
GoogleMapInspector(controller.channel);
inspectorCompleter.complete(inspector);
},
),
));

inspector = await inspectorCompleter.future;
myLocationEnabled = await inspector.isMyLocationEnabled();
expect(myLocationEnabled, false);
myLocationButtonEnabled = await inspector.isMyLocationButtonEnabled();
expect(myLocationButtonEnabled, false);
}, skip: true);
//TODO: Remove `skip' when https://github.com/flutter/flutter/issues/12561 will be fixed

testWidgets('testTraffic', (WidgetTester tester) async {
final Key key = GlobalKey();
final Completer<GoogleMapInspector> inspectorCompleter =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ - (void)onMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
} else if ([call.method isEqualToString:@"map#isScrollGesturesEnabled"]) {
NSNumber* isScrollGesturesEnabled = @(_mapView.settings.scrollGestures);
result(isScrollGesturesEnabled);
} else if ([call.method isEqualToString:@"map#isMyLocationEnabled"]) {
NSNumber* isMyLocationEnabled = @(_mapView.myLocationEnabled);
result(isMyLocationEnabled);
} else if ([call.method isEqualToString:@"map#isMyLocationButtonEnabled"]) {
NSNumber* isMyLocationButtonEnabled = @(_mapView.settings.myLocationButton);
result(isMyLocationButtonEnabled);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: google_maps_flutter
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter/google_maps_flutter
version: 1.0.5
version: 1.0.6

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,27 +451,27 @@ void main() {
textDirection: TextDirection.ltr,
child: GoogleMap(
initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)),
myLocationEnabled: false,
myLocationButtonEnabled: false,
),
),
);

final FakePlatformGoogleMap platformGoogleMap =
fakePlatformViewsController.lastCreatedView;

expect(platformGoogleMap.myLocationButtonEnabled, true);
expect(platformGoogleMap.myLocationButtonEnabled, false);

await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: GoogleMap(
initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)),
myLocationButtonEnabled: false,
myLocationButtonEnabled: true,
),
),
);

expect(platformGoogleMap.myLocationButtonEnabled, false);
expect(platformGoogleMap.myLocationButtonEnabled, true);
});

testWidgets('Is default padding 0', (WidgetTester tester) async {
Expand Down