diff --git a/packages/plugin_platform_interface/CHANGELOG.md b/packages/plugin_platform_interface/CHANGELOG.md index 7df1834966dd7..96533f01c10fc 100644 --- a/packages/plugin_platform_interface/CHANGELOG.md +++ b/packages/plugin_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.0-nullsafety.2 + +* Use Mockito null safe. + ## 1.1.0-nullsafety.1 * Bump Dart SDK to support null safety. diff --git a/packages/plugin_platform_interface/lib/plugin_platform_interface.dart b/packages/plugin_platform_interface/lib/plugin_platform_interface.dart index cd87b04dc739c..6e425a19a048f 100644 --- a/packages/plugin_platform_interface/lib/plugin_platform_interface.dart +++ b/packages/plugin_platform_interface/lib/plugin_platform_interface.dart @@ -43,7 +43,7 @@ abstract class PlatformInterface { /// Pass a private, class-specific `const Object()` as the `token`. PlatformInterface({required Object token}) : _instanceToken = token; - final Object _instanceToken; + final Object? _instanceToken; /// Ensures that the platform instance has a token that matches the /// provided token and throws [AssertionError] if not. diff --git a/packages/plugin_platform_interface/pubspec.yaml b/packages/plugin_platform_interface/pubspec.yaml index 05fc918bf9b52..084e577dbf991 100644 --- a/packages/plugin_platform_interface/pubspec.yaml +++ b/packages/plugin_platform_interface/pubspec.yaml @@ -12,7 +12,7 @@ description: Reusable base class for Flutter plugin platform interfaces. # be done when absolutely necessary and after the ecosystem has already migrated to 1.X.Y version # that is forward compatible with 2.0.0 (ideally the ecosystem have migrated to depend on: # `plugin_platform_interface: >=1.X.Y <3.0.0`). -version: 1.1.0-nullsafety.1 +version: 1.1.0-nullsafety.2 repository: https://github.com/flutter/plugins/tree/master/packages/plugin_platform_interface @@ -23,6 +23,6 @@ dependencies: meta: ^1.3.0-nullsafety.3 dev_dependencies: - mockito: ^4.1.1 + mockito: ^5.0.0-nullsafety.2 test: ^1.10.0-nullsafety.1 pedantic: ^1.10.0-nullsafety.1 diff --git a/packages/plugin_platform_interface/test/plugin_platform_interface_test.dart b/packages/plugin_platform_interface/test/plugin_platform_interface_test.dart index b07dd4dcede10..0488c20f3efb2 100644 --- a/packages/plugin_platform_interface/test/plugin_platform_interface_test.dart +++ b/packages/plugin_platform_interface/test/plugin_platform_interface_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(egarciad): Remove once Mockito is migrated to null safety. -// @dart = 2.9 import 'package:mockito/mockito.dart'; import 'package:test/test.dart';