Skip to content

Commit dc22884

Browse files
authored
[google_maps_flutter_web] Migrate to null-safety. (flutter#3726)
* Updates JS-interop package to google_maps ^5.1.0 * Breaking changes: * The property `icon` of a `Marker` cannot be `null`. Defaults to `BitmapDescriptor.defaultMarker` * The property `initialCameraPosition` of a `GoogleMapController` can't be `null`. It is also marked as `required`. * The parameter `creationId` of the `buildView` method cannot be `null` (this should be handled internally for users of the plugin) * Most of the Controller methods can't be called after `remove`/`dispose`. Calling these methods now will throw an Assertion error. Before it'd be a no-op, or a null-pointer exception.
1 parent febc3e3 commit dc22884

30 files changed

+1245
-605
lines changed

packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 0.3.0
2+
3+
* Migrate package to null-safety.
4+
* **Breaking changes:**
5+
* The property `icon` of a `Marker` cannot be `null`. Defaults to `BitmapDescriptor.defaultMarker`
6+
* The property `initialCameraPosition` of a `GoogleMapController` can't be `null`. It is also marked as `required`.
7+
* The parameter `creationId` of the `buildView` method cannot be `null` (this should be handled internally for users of the plugin)
8+
* Most of the Controller methods can't be called after `remove`/`dispose`. Calling these methods now will throw an Assertion error. Before it'd be a no-op, or a null-pointer exception.
9+
110
## 0.2.1
211

312
* Move integration tests to `example`.

packages/google_maps_flutter/google_maps_flutter_web/example/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ Make sure you have updated to the latest Flutter master.
1919

2020
* Single: `./run_test.sh integration_test/TEST_NAME.dart`
2121
* All: `./run_test.sh`
22+
23+
## Mocks
24+
25+
There's new `.mocks.dart` files next to the test files that use them.
26+
27+
Mock files are [generated by `package:mockito`](https://github.com/dart-lang/mockito/blob/master/NULL_SAFETY_README.md#code-generation). The contents of these files can change with how the mocks are used within the tests, in addition to actual changes in the APIs they're mocking.
28+
29+
Mock files can be updated either manually by running the following command: `flutter pub run build_runner build` (or the `regen_mocks.sh` script), or automatically on each call to the `run_test.sh` script.
30+
31+
Please, add whatever changes show up in mock files to your PRs, or CI will fail.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
targets:
2+
$default:
3+
sources:
4+
- integration_test/*.dart
5+
- lib/$lib$
6+
- $package$

0 commit comments

Comments
 (0)