Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List<dynamic> is not a sub-type of type List<String> #29

Open
Okiring opened this issue Jan 19, 2022 · 1 comment
Open

List<dynamic> is not a sub-type of type List<String> #29

Okiring opened this issue Jan 19, 2022 · 1 comment

Comments

@Okiring
Copy link

Okiring commented Jan 19, 2022

static List<String?> _lubanCompressList(List objects) {
var results = [];
objects.forEach((_o) {
results.add(_lubanCompress(_o));
});
return results as List<String?>;
}

The above method was causing that error: Had to change to the below and resolved the error

static List<String?> _lubanCompressList(List objects) {
var results = [];
objects.forEach((_o) {
results.add(_lubanCompress(_o));
});
return (results as List<dynamic?>).cast<String?>();
}

@icnahom
Copy link

icnahom commented Apr 18, 2022

@crazecoder compressImageList is not working, it needs this quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants