fluttercommunity / fluttercommunity/flutter_downloader

should update the example of DownloadTaskStatus from initState

Open
#882 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
940
Forks
561
Avg merge
1h 18m
Merged PRs (30d)
1

Description

From example,
DownloadTaskStatus status = DownloadTaskStatus.(data[1]);

```
IsolateNameServer.registerPortWithName(_port.sendPort, 'downloader_send_port');
_port.listen((dynamic data) {
String id = data[0];
DownloadTaskStatus status = DownloadTaskStatus(data[1]);
int progress = data[2];
setState((){ });
});

FlutterDownloader.registerCallback(downloadCallback);
}
```

should be
DownloadTaskStatus status = DownloadTaskStatus.fromInt(data[1]);

```
IsolateNameServer.registerPortWithName(_port.sendPort, 'downloader_send_port');
_port.listen((dynamic data) {
String id = data[0];
DownloadTaskStatus status = DownloadTaskStatus.fromInt(data[1]);
int progress = data[2];
setState((){ });
});

FlutterDownloader.registerCallback(downloadCallback);
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.