Skip to content

Commit

Permalink
fix: Fixed annotation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisThein committed Feb 19, 2022
1 parent 0d82173 commit 866ff78
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ jobs:
- name: Run dart analyze
run: dart analyze
- name: run tests
run: flutter test
run: flutter test --coverage
- name: upload coverage report
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV}}
file: ./coverage/lcov.info
- name: build example project
working-directory: ./example
run: flutter build ios --release --no-codesign
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
.pub/
build/
pubspec.lock
coverage/

# Android related
**/android/**/gradle-wrapper.jar
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# apple_maps_flutter

[![codecov](https://codecov.io/gh/LuisThein/apple_maps_flutter/branch/master/graph/badge.svg)](https://codecov.io/gh/LuisThein/apple_maps_flutter)

A Flutter plugin that provides an Apple Maps widget.

The plugin relies on Flutter's mechanism for embedding Android and iOS views. As that mechanism is currently in a developers preview, this plugin should also be considered a developers preview.
Expand Down
2 changes: 0 additions & 2 deletions lib/src/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ class AppleMapController {
case 'annotation#onZIndexChanged':
_appleMapState.onAnnotationZIndexChanged(
call.arguments['annotationId'], call.arguments['zIndex']);
print(
'AnnotationId: ${call.arguments['annotationId']}, got zIndex: ${call.arguments['zIndex']}');
break;
case 'map#onTap':
_appleMapState.onTap(LatLng._fromJson(call.arguments['position'])!);
Expand Down
15 changes: 9 additions & 6 deletions test/fake_maps_controllers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class FakePlatformAppleMap {
final String annotationId = annotationData['annotationId'];
final bool draggable = annotationData['draggable'];
final bool visible = annotationData['visible'];
final double alpha = annotationData['alpha'];

final dynamic infoWindowData = annotationData['infoWindow'];
InfoWindow infoWindow = InfoWindow.noText;
Expand All @@ -131,12 +132,14 @@ class FakePlatformAppleMap {
);
}

result.add(Annotation(
annotationId: AnnotationId(annotationId),
draggable: draggable,
visible: visible,
infoWindow: infoWindow,
));
result.add(
Annotation(
annotationId: AnnotationId(annotationId),
draggable: draggable,
visible: visible,
infoWindow: infoWindow,
alpha: alpha),
);
}

return result;
Expand Down

0 comments on commit 866ff78

Please sign in to comment.