File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 15
15
strategy :
16
16
fail-fast : false
17
17
matrix :
18
- sdk : [ 2.18.7, stable ]
18
+ sdk : [ 2.18.7 ] # TODO: re-add stable when compatible
19
19
steps :
20
20
- uses : actions/checkout@v3
21
21
- uses : dart-lang/setup-dart@v1
44
44
- uses : actions/checkout@v3
45
45
- uses : dart-lang/setup-dart@v1
46
46
with :
47
- sdk : stable
47
+ sdk : 2.18.7
48
48
49
49
- id : install
50
50
name : Install dependencies
Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## 4.0.1
4
+
5
+ - Fix type mismatch between the expected return type of the function passed to
6
+ ` DevTool.fromFunction() ` and the ` DevTool.run() ` method. The updated type is
7
+ more permissive and so should not be breaking.
8
+
3
9
## 4.0.0
4
10
5
11
- Migrated to null safety. The new SDK minimum is 2.18
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ abstract class DevTool {
12
12
DevTool ();
13
13
14
14
factory DevTool .fromFunction (
15
- FutureOr <int > ? Function (DevToolExecutionContext context) function,
15
+ FutureOr <int ?> Function (DevToolExecutionContext context) function,
16
16
{ArgParser ? argParser}) =>
17
17
FunctionTool (function, argParser: argParser);
18
18
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ import '../utils/assert_no_positional_args_nor_args_after_separator.dart';
13
13
/// Use [DevTool.fromFunction] to create [FunctionTool] instances.
14
14
class FunctionTool extends DevTool {
15
15
FunctionTool (
16
- FutureOr <int > ? Function (DevToolExecutionContext context) function,
16
+ FutureOr <int ?> Function (DevToolExecutionContext context) function,
17
17
{ArgParser ? argParser})
18
18
: _argParser = argParser,
19
19
_function = function;
20
20
21
- final FutureOr <int > ? Function (DevToolExecutionContext context) _function;
21
+ final FutureOr <int ?> Function (DevToolExecutionContext context) _function;
22
22
23
23
// ---------------------------------------------------------------------------
24
24
// DevTool Overrides
You can’t perform that action at this time.
0 commit comments