Skip to content

Commit

Permalink
[plugin_platform_interface] Use Mockito nnbd (flutter#3437)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Garcia authored Jan 16, 2021
1 parent 5cff819 commit faa26ec
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/plugin_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit faa26ec

Please sign in to comment.