fluttercommunity / fluttercommunity/flutter_downloader
Compile error in v1.10.3 after upgrade from v1.10.2
- Dominant language
- Kotlin
- Stars
- 940
- Forks
- 561
- Avg merge
- 1h 18m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
Compile error in v1.10.3 after upgrade from v1.10.2:
```
Error: The argument type 'void Function(String, DownloadTaskStatus, int)' can't be assigned to the parameter type 'void Function(String, int, int)'.
'DownloadTaskStatus' is from 'package:flutter_downloader/src/models.dart' ('../../../../../.pub-cache/hosted/pub.dev/flutter_downloader-1.10.3/lib/src/models.dart').
await FlutterDownloader.registerCallback(downloadCallback);
```
**To Reproduce**
Write a callback funtion in with parameters (String, DownloadTaskStatus, int) and register it in v1.10.2 -> works fine
Use the same callback function in v1.10.3 -> fails to compile.
In v1.10.2 the callback function was defined as follows:
```
typedef DownloadCallback = void Function(
String id,
DownloadTaskStatus status,
int progress,
);
```
In v1.10.3 it changed to:
```
typedef DownloadCallback = void Function(
String id,
int status,
int progress,
);
```
**Expected behavior**
No compile errors. No breaking changes in patch version.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.