-
Notifications
You must be signed in to change notification settings - Fork 80
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
migrate to null-safety #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Just one thing that I'd like changed back and that's using the normal UI builder as the default builder instead of the small UI builder.
lib/src/widget_builders.dart
Outdated
@required this.normal, | ||
this.small, | ||
this.normal, | ||
required this.small, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make normal required and not small. the normal view is what you want to show if there's no UI defined.
lib/src/widget_builders.dart
Outdated
// If none of the layouts above are supplied or we're on the normal size layout then we show the normal layout | ||
return normal(context); | ||
// If none of the layouts above are supplied or we're on the small size layout then we show the small layout | ||
return small(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change back to using the normal function when there's nothing defined.
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. |
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() |
* add RefinedSize.small * add more tests for RefinedSize * use normal WidgetBuilder as default in RefinedLayoutBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
@bierbaumtim Thanks a lot for the help! I've published it. |
fixes #22