Dn-a / flutter_inner_drawer

Inner Drawer is an easy way to create an internal side section (left/right) where you can insert a list-menu or other.
https://pub.dartlang.org/packages/flutter_inner_drawer
MIT License
514 stars 129 forks source link

fix crash in flutter2; use correct way to filter nullable widgets #71

Closed pythoneer closed 3 years ago

pythoneer commented 3 years ago

This should close issue #70. the usage of .where((a) => a != null).toList() as List<Widget> does not work. with the filter of where you still end up with Widget? where non of them is null but you can't just cast List<T?> to List<T> that are not related types. Looks like there is a specific function for that whereType with a type parameter that can go from T?to T.

pythoneer commented 3 years ago

sorry i did not really test this and didn't see that there already is a pull request solving this here https://github.com/Dn-a/flutter_inner_drawer/pull/69

closing