Skip to content

Commit 703923a

Browse files
authored
Fix _BinaryFunction typedef to only check arity (flutter#12)
Fixes flutter#11 Update to the new Function syntax and drop the comment which effectively only repeats the name.
1 parent 56338f7 commit 703923a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.2.2+4
2+
3+
* Fix the check for `onConnection` to check the number of arguments and not
4+
that the arguments are `dynamic`.
5+
16
## 0.2.2+3
27

38
* Set max SDK version to `<3.0.0`, and adjust other dependencies.

lib/shelf_web_socket.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import 'package:web_socket_channel/web_socket_channel.dart';
77

88
import 'src/web_socket_handler.dart';
99

10-
/// A typedef used to determine if a function takes two arguments or not.
11-
typedef _BinaryFunction(arg1, arg2);
10+
typedef _BinaryFunction = void Function(Null, Null);
1211

1312
/// Creates a Shelf handler that upgrades HTTP requests to WebSocket
1413
/// connections.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: shelf_web_socket
2-
version: 0.2.2+3
2+
version: 0.2.2+4
33

44
description: A WebSocket handler for Shelf.
55
author: Dart Team <[email protected]>

0 commit comments

Comments
 (0)