Skip to content

Commit e33695d

Browse files
committed
Changes for pre-release in pub
Signed-off-by: Ayon Das <[email protected]>
1 parent 17e97b6 commit e33695d

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@
1818
## 0.0.5
1919

2020
* Fixed a bug where invokeMethod only accepting string as return value
21+
22+
## 0.0.6-dev.1
23+
24+
* Possible fix for callbacks throwing exception about type mismatch.
25+
* invokeMethod now has generic return type & upto 10 arguments support.

example/lib/main.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ class _MyAppState extends State<MyApp> {
6767
);
6868
}
6969

70-
_onStatusChange(String status) {
70+
_onStatusChange(dynamic status) {
7171
if (mounted) {
7272
setState(() {
73-
_signalRStatus = status;
73+
_signalRStatus = status as String;
7474
});
7575
}
7676
}
@@ -81,11 +81,11 @@ class _MyAppState extends State<MyApp> {
8181

8282
_buttonTapped() async {
8383
final res = await signalR
84-
.invokeMethod("<Your methodname here>", arguments: ['<Your arguments here>']).catchError((error) {
84+
.invokeMethod<String>("<Your methodname here>", arguments: ['<Your arguments here>']).catchError((error) {
8585
print(error.toString());
8686
});
8787
final snackBar =
88-
SnackBar(content: Text('SignalR Method Response: ${res.toString()}'));
88+
SnackBar(content: Text('SignalR Method Response: $res'));
8989
_scaffoldKey.currentState.showSnackBar(snackBar);
9090
}
9191
}

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ packages:
9494
path: ".."
9595
relative: true
9696
source: path
97-
version: "0.0.5"
97+
version: "0.0.6-dev.1"
9898
sky_engine:
9999
dependency: transitive
100100
description: flutter

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: signalr_flutter
22
description: A flutter plugin for .net SignalR client. This client is for ASP.Net SignalR, not for .Net Core SignalR.
3-
version: 0.0.5
3+
version: 0.0.6-dev.1
44
homepage: https://github.com/AS-Devs/signalr_flutter
55

66
environment:

0 commit comments

Comments
 (0)