multiselect_formfield icon indicating copy to clipboard operation
multiselect_formfield copied to clipboard

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

Open diaodiallo opened this issue 1 year ago • 2 comments

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 avatar May 31 '23 10:05 diaodiallo

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

diaodiallo avatar May 31 '23 11:05 diaodiallo

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

WaseemAbbasi22 avatar Sep 16 '23 08:09 WaseemAbbasi22