-
Notifications
You must be signed in to change notification settings - Fork 344
Debugger: soft wrap console input lines #8855
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
Conversation
super.key, | ||
}) : searchFieldHeight = searchFieldHeight ?? defaultTextFieldHeight; | ||
}) : searchFieldHeight = searchFieldHeight ?? defaultTextFieldHeight, | ||
_shouldExpandHeight = shouldExpandHeight; |
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.
is there a reason this is a private field? Can shouldExpandHeight just be a public field so that we can use this.shouldExpandHeight = true
in the constructor parameter?
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.
Also, should the default value be false
to match the code below?
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.
See #8855 (comment) before addressing this comment.
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.
Only in order to prefer private fields. https://dart.dev/effective-dart/design#prefer-making-declarations-private
It improves static analysis (like you are told when the field could be final, or is unused). It sends readability signals that the field is not intended to be read or written from outside the library. And the price you pay is that you can't use this.
in the constructor parameter.
If there is a style in DevTools that is counter to this Effective Dart guideline, we can document that and prefer public.
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.
lgtm with a couple comments
See #5505 for original issue screenshot. Here is another:
Afterwards, we get this nice expanding behavior:
The console itself is still expandable:
Fixes #5505