-
Notifications
You must be signed in to change notification settings - Fork 339
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
Isolate selector in footer bar is a PopupMenu
instead of a DropdownMenu
#3989
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.
have you checked these changes with a narrow screen width? I suspect that removing the Flexible and Expanded widgets may lead to renderflex overflow errors
), | ||
), | ||
); | ||
final children = <Widget>[]; |
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.
let's construct this list directly instead of calling children.add a bunch of times:
final children = [
buildHelpUrlStatus(context, currentScreen, textTheme),
const BulletSpacer(),
if (showIsolateSelector)
...[
const IsolateSelector(),
const BulletSpacer(),
],
...
];
We can also just build this directly as the children property in row. It actually makes the build method a little more readable.
Row(
children: [ ... ],
)
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.
Good point! Only change to your suggestion is I've pulled getting the children into a separate method
style: textTheme.bodyText2, | ||
overflow: TextOverflow.clip, | ||
), | ||
if (!isNarrow) const SizedBox(width: denseSpacing), |
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.
write if (!isNarrow) ...[ ... ],
instead so you can reuse the if statement
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.
one comment then lgtm
Fixes #3985
Also cleans up some unnecessary formatting in the footer (removes individual alignment of items, which was unnecessary because they end up being aligned correctly in their row with
spaceBetween
).