Skip to content

Commit 2260d67

Browse files
Emmanuel Garciaadsonpleal
Emmanuel Garcia
authored andcommitted
[plugin_platform_interface] Use Mockito nnbd (flutter#3437)
1 parent 32cd6ff commit 2260d67

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

packages/plugin_platform_interface/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.0-nullsafety.2
2+
3+
* Use Mockito null safe.
4+
15
## 1.1.0-nullsafety.1
26

37
* Bump Dart SDK to support null safety.

packages/plugin_platform_interface/lib/plugin_platform_interface.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ abstract class PlatformInterface {
4343
/// Pass a private, class-specific `const Object()` as the `token`.
4444
PlatformInterface({required Object token}) : _instanceToken = token;
4545

46-
final Object _instanceToken;
46+
final Object? _instanceToken;
4747

4848
/// Ensures that the platform instance has a token that matches the
4949
/// provided token and throws [AssertionError] if not.

packages/plugin_platform_interface/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: Reusable base class for Flutter plugin platform interfaces.
1212
# be done when absolutely necessary and after the ecosystem has already migrated to 1.X.Y version
1313
# that is forward compatible with 2.0.0 (ideally the ecosystem have migrated to depend on:
1414
# `plugin_platform_interface: >=1.X.Y <3.0.0`).
15-
version: 1.1.0-nullsafety.1
15+
version: 1.1.0-nullsafety.2
1616

1717
repository: https://github.com/flutter/plugins/tree/master/packages/plugin_platform_interface
1818

@@ -23,6 +23,6 @@ dependencies:
2323
meta: ^1.3.0-nullsafety.3
2424

2525
dev_dependencies:
26-
mockito: ^4.1.1
26+
mockito: ^5.0.0-nullsafety.2
2727
test: ^1.10.0-nullsafety.1
2828
pedantic: ^1.10.0-nullsafety.1

packages/plugin_platform_interface/test/plugin_platform_interface_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// TODO(egarciad): Remove once Mockito is migrated to null safety.
6-
// @dart = 2.9
75
import 'package:mockito/mockito.dart';
86
import 'package:test/test.dart';
97

0 commit comments

Comments
 (0)