Skip to content

Commit 1d1fca5

Browse files
authored
fix: send message by [int] on port (#817)
1 parent 8b7ac15 commit 1d1fca5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example/lib/home_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class _MyHomePageState extends State<MyHomePage> {
6464
}
6565
_port.listen((dynamic data) {
6666
final taskId = (data as List<dynamic>)[0] as String;
67-
final status = data[1] as DownloadTaskStatus;
67+
final status = DownloadTaskStatus(data[1] as int);
6868
final progress = data[2] as int;
6969

7070
print(
@@ -99,7 +99,7 @@ class _MyHomePageState extends State<MyHomePage> {
9999
);
100100

101101
IsolateNameServer.lookupPortByName('downloader_send_port')
102-
?.send([id, status, progress]);
102+
?.send([id, status.value, progress]);
103103
}
104104

105105
Widget _buildDownloadList() {

0 commit comments

Comments
 (0)