Skip to content

Commit ca4671c

Browse files
[google_maps_flutter] Activate leak testing (#8368)
Activate leak testing for google_maps_flutter. The package uses disposable objects, it will make sure those are properly disposed. See the documentation: https://github.com/dart-lang/leak_tracker/blob/main/doc%2Fleak_tracking%2FDETECT.md
1 parent 15f5484 commit ca4671c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/google_maps_flutter/google_maps_flutter/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies:
2929
dev_dependencies:
3030
flutter_test:
3131
sdk: flutter
32+
leak_tracker_flutter_testing: any
3233
plugin_platform_interface: ^2.1.7
3334
stream_transform: ^2.0.0
3435

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'dart:async';
6+
7+
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
8+
9+
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
10+
LeakTesting.enable();
11+
LeakTracking.warnForUnsupportedPlatforms = false;
12+
await testMain();
13+
}

0 commit comments

Comments
 (0)