File tree 4 files changed +14
-21
lines changed
packages/url_launcher/url_launcher_platform_interface 4 files changed +14
-21
lines changed Original file line number Diff line number Diff line change 1
- ## 2.0.0-nullsafety.1
2
-
3
- * Bump Dart SDK to support null safety.
4
-
5
- ## 2.0.0-nullsafety
1
+ ## 2.0.0
6
2
7
3
* Migrate to null safety.
8
4
Original file line number Diff line number Diff line change @@ -3,19 +3,19 @@ description: A common platform interface for the url_launcher plugin.
3
3
homepage : https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_platform_interface
4
4
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
5
5
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
6
- version : 2.0.0-nullsafety.1
6
+ version : 2.0.0
7
7
8
8
dependencies :
9
9
flutter :
10
10
sdk : flutter
11
- plugin_platform_interface : ^1.1.0-nullsafety.1
11
+ plugin_platform_interface : " >=1.0.0 <3.0.0 "
12
12
13
13
dev_dependencies :
14
14
flutter_test :
15
15
sdk : flutter
16
- mockito : ^4.1.1
17
- pedantic : ^1.10.0-nullsafety.1
16
+ mockito : ^5.0.0-nullsafety.7
17
+ pedantic : ^1.10.0
18
18
19
19
environment :
20
- sdk : " >=2.12.0-0 <3.0.0"
20
+ sdk : " >=2.12.0-2.12.0-259.9.beta <3.0.0"
21
21
flutter : " >=1.22.0"
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- // TODO(egarciad): Remove once Mockito has been migrated to null safety.
6
- // @dart = 2.9
7
-
8
5
import 'dart:ui' ;
9
6
10
7
import 'package:mockito/mockito.dart' ;
@@ -19,18 +16,20 @@ final MethodCodec _codec = const JSONMethodCodec();
19
16
void main () {
20
17
TestWidgetsFlutterBinding .ensureInitialized ();
21
18
22
- PlatformMessageCallback oldHandler;
23
- MethodCall lastCall;
19
+ PlatformMessageCallback ? oldHandler;
20
+ MethodCall ? lastCall;
24
21
25
22
setUp (() {
26
23
oldHandler = window.onPlatformMessage;
27
24
window.onPlatformMessage = (
28
25
String name,
29
- ByteData data,
30
- PlatformMessageResponseCallback callback,
26
+ ByteData ? data,
27
+ PlatformMessageResponseCallback ? callback,
31
28
) {
32
29
lastCall = _codec.decodeMethodCall (data);
33
- callback (_codec.encodeSuccessEnvelope (true ));
30
+ if (callback != null ) {
31
+ callback (_codec.encodeSuccessEnvelope (true ));
32
+ }
34
33
};
35
34
});
36
35
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- // TODO(mvanbeusekom): Remove once Mockito is migrated to null safety.
6
- // @dart = 2.9
7
5
import 'package:mockito/mockito.dart' ;
8
6
import 'package:flutter/services.dart' ;
9
7
import 'package:flutter_test/flutter_test.dart' ;
@@ -315,5 +313,5 @@ class ImplementsUrlLauncherPlatform extends Mock
315
313
316
314
class ExtendsUrlLauncherPlatform extends UrlLauncherPlatform {
317
315
@override
318
- final LinkDelegate linkDelegate = null ;
316
+ final LinkDelegate ? linkDelegate = null ;
319
317
}
You can’t perform that action at this time.
0 commit comments