FilledStacks / responsive_builder

A set of widgets to make responsive UI building in flutter more readable
MIT License
497 stars 80 forks source link

migrate to null-safety #23

Closed bierbaumtim closed 3 years ago

bierbaumtim commented 3 years ago

fixes #22

bierbaumtim commented 3 years ago

The problem is that if normal is required, the small function never gets used, because the normal function can't be null. So this will make the small function useless. To solve the problem we should introduce a RefinedSize.small. With this we can check if the size is RefinedSize.small and than use the small one.

FilledStacks commented 3 years ago

You're right. Then we can instead update the case before the final return to check for small and then return the small() in there. Then we can leave the default if nothing is defined to return normal()

FilledStacks commented 3 years ago

@bierbaumtim Thanks a lot for the help! I've published it.