Skip to content

Commit c89d837

Browse files
committed
fix: Fixed annotation tests
1 parent 0d82173 commit c89d837

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

.github/workflows/dart.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ jobs:
2828
- name: Run dart analyze
2929
run: dart analyze
3030
- name: run tests
31-
run: flutter test
31+
run: flutter test --coverage
32+
- name: upload coverage report
33+
uses: codecov/codecov-action@v2
34+
with:
35+
token: ${{secrets.CODECOV}}
36+
file: ./coverage/lcov.info
3237
- name: build example project
3338
working-directory: ./example
3439
run: flutter build ios --release --no-codesign

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
.pub/
3131
build/
3232
pubspec.lock
33+
coverage/
3334

3435
# Android related
3536
**/android/**/gradle-wrapper.jar

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# apple_maps_flutter
22

3+
[![codecov](https://codecov.io/gh/erluxman/productive/branch/master/graph/badge.svg)](https://codecov.io/gh/LuisThein/apple_maps_flutter)
4+
35
A Flutter plugin that provides an Apple Maps widget.
46

57
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.

lib/src/controller.dart

-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ class AppleMapController {
6969
case 'annotation#onZIndexChanged':
7070
_appleMapState.onAnnotationZIndexChanged(
7171
call.arguments['annotationId'], call.arguments['zIndex']);
72-
print(
73-
'AnnotationId: ${call.arguments['annotationId']}, got zIndex: ${call.arguments['zIndex']}');
7472
break;
7573
case 'map#onTap':
7674
_appleMapState.onTap(LatLng._fromJson(call.arguments['position'])!);

test/fake_maps_controllers.dart

+9-6
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ class FakePlatformAppleMap {
120120
final String annotationId = annotationData['annotationId'];
121121
final bool draggable = annotationData['draggable'];
122122
final bool visible = annotationData['visible'];
123+
final double alpha = annotationData['alpha'];
123124

124125
final dynamic infoWindowData = annotationData['infoWindow'];
125126
InfoWindow infoWindow = InfoWindow.noText;
@@ -131,12 +132,14 @@ class FakePlatformAppleMap {
131132
);
132133
}
133134

134-
result.add(Annotation(
135-
annotationId: AnnotationId(annotationId),
136-
draggable: draggable,
137-
visible: visible,
138-
infoWindow: infoWindow,
139-
));
135+
result.add(
136+
Annotation(
137+
annotationId: AnnotationId(annotationId),
138+
draggable: draggable,
139+
visible: visible,
140+
infoWindow: infoWindow,
141+
alpha: alpha),
142+
);
140143
}
141144

142145
return result;

0 commit comments

Comments
 (0)