Skip to content

Commit a8bb833

Browse files
[plugin_platform_interface] Switch mixin to mixin class (#5420)
The test mixin is currently declared as a `class`, which causes problems for projects with a minimum Dart version of 3.0. This switches it to `mixin class`; ideally it would just be a `mixin`, but in theory that could break something, so since this is such a core package in the ecosystem we want to be as conservative as possible. (While the breaking change would only in theory happen to test code, it's possible that someone ignored the `visibleForTesting`, and we have an easy way to avoid the possibility entirely.) Fixes flutter/flutter#123241
1 parent 14ed53b commit a8bb833

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/plugin_platform_interface/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.1.7
2+
3+
* Changes `MockPlatformInterfaceMixin` to a `mixin class` for better
4+
compatibility with projects that have a minumum Dart SDK version of 3.0.
5+
* Updates minimum supported SDK version to Dart 3.0.
6+
17
## 2.1.6
28

39
* Adds pub topics to package metadata.

packages/plugin_platform_interface/lib/plugin_platform_interface.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ abstract class PlatformInterface {
126126
/// implements UrlLauncherPlatform {}
127127
/// ```
128128
@visibleForTesting
129-
abstract class MockPlatformInterfaceMixin implements PlatformInterface {}
129+
abstract mixin class MockPlatformInterfaceMixin implements PlatformInterface {}

packages/plugin_platform_interface/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
1515
# be done when absolutely necessary and after the ecosystem has already migrated to 2.X.Y version
1616
# that is forward compatible with 3.0.0 (ideally the ecosystem have migrated to depend on:
1717
# `plugin_platform_interface: >=2.X.Y <4.0.0`).
18-
version: 2.1.6
18+
version: 2.1.7
1919

2020
environment:
21-
sdk: ">=2.19.0 <4.0.0"
21+
sdk: ">=3.0.0 <4.0.0"
2222

2323
dependencies:
2424
meta: ^1.3.0

0 commit comments

Comments
 (0)