Skip to content

Commit

Permalink
[google_maps_flutter] Activate leak testing (#8368)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ValentinVignal authored Jan 5, 2025
1 parent 15f5484 commit ca4671c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
leak_tracker_flutter_testing: any
plugin_platform_interface: ^2.1.7
stream_transform: ^2.0.0

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';

import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';

Future<void> testExecutable(FutureOr<void> Function() testMain) async {
LeakTesting.enable();
LeakTracking.warnForUnsupportedPlatforms = false;
await testMain();
}

0 comments on commit ca4671c

Please sign in to comment.