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

After Migrating to null safety have this issue type '() => Null' is not a subtype of type '(() => Map<String, dynamic>)?' of 'orElse' #53

Open
diaodiallo opened this issue May 31, 2023 · 2 comments

Comments

@diaodiallo
Copy link

Returning null around here var existingItem = dataSource!.singleWhere(((itm) => itm[valueField] == item), orElse: () => null); at line 72 is causing this. I think should replace null by [] but I did not test it.

@diaodiallo
Copy link
Author

I could fix this by replacing () => null by null I will request a pull for this. Thanks

@WaseemAbbasi22
Copy link

instead of using List<Map<String,dynamic> as data source just use List it will solve this issue

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