Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[url_launcher] Bump platform interface package to stable NNBD #3570

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
## 2.0.0-nullsafety.1

* Bump Dart SDK to support null safety.

## 2.0.0-nullsafety
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. do we remove the prereleases notes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I was told: #3543 (comment)

We should capture everything that is interesting in aggregate into the stable changelog though, in cases where there are other fixes.

## 2.0.0

* Migrate to null safety.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ description: A common platform interface for the url_launcher plugin.
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.0.0-nullsafety.1
version: 2.0.0

dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^1.1.0-nullsafety.1
plugin_platform_interface: ">=1.0.0 <3.0.0"

dev_dependencies:
flutter_test:
sdk: flutter
mockito: ^4.1.1
pedantic: ^1.10.0-nullsafety.1
mockito: ^5.0.0-nullsafety.7
pedantic: ^1.10.0

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0-2.12.0-259.9.beta <3.0.0"
flutter: ">=1.22.0"
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +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 has been migrated to null safety.
// @dart = 2.9

import 'dart:ui';

import 'package:mockito/mockito.dart';
Expand All @@ -19,18 +16,20 @@ final MethodCodec _codec = const JSONMethodCodec();
void main() {
TestWidgetsFlutterBinding.ensureInitialized();

PlatformMessageCallback oldHandler;
MethodCall lastCall;
PlatformMessageCallback? oldHandler;
MethodCall? lastCall;

setUp(() {
oldHandler = window.onPlatformMessage;
window.onPlatformMessage = (
String name,
ByteData data,
PlatformMessageResponseCallback callback,
ByteData? data,
PlatformMessageResponseCallback? callback,
) {
lastCall = _codec.decodeMethodCall(data);
callback(_codec.encodeSuccessEnvelope(true));
if (callback != null) {
callback(_codec.encodeSuccessEnvelope(true));
}
};
});

Expand Down
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(mvanbeusekom): Remove once Mockito is migrated to null safety.
// @dart = 2.9
import 'package:mockito/mockito.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
Expand Down Expand Up @@ -315,5 +313,5 @@ class ImplementsUrlLauncherPlatform extends Mock

class ExtendsUrlLauncherPlatform extends UrlLauncherPlatform {
@override
final LinkDelegate linkDelegate = null;
final LinkDelegate? linkDelegate = null;
}