Skip to content
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

Add floating debugger controls when app is paused #2676

Merged
merged 4 commits into from
Feb 4, 2021

Conversation

kenzieschmoll
Copy link
Member

This will show up when an app is paused (except when the debugger screen is the current screen)

Screen Shot 2021-02-04 at 10 53 37 AM

Fixes #2377
Fixes #2547

Container(
decoration: BoxDecoration(
border: Border(
left: i == 0 ? BorderSide(color: color) : BorderSide.none,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is only the left side special cased and not the right side.?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do this to make sure there are not any double borders. The right side of the previous element will serve as the left border for the next element (for all except the first since the first does not have a previous element)

return ValueListenableBuilder<bool>(
valueListenable: controller.isPaused,
builder: (context, paused, _) {
if (!paused) return const SizedBox();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rather than having this become a sized box when not paused consider making the ui unclickable when not paused and providing an animated transition showing and hiding the ui.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. done - see pr description for gif

Copy link
Contributor

@jacob314 jacob314 left a 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 minor nits.

@kenzieschmoll kenzieschmoll merged commit ba53577 into flutter:master Feb 4, 2021
@kenzieschmoll kenzieschmoll deleted the paused branch February 4, 2021 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants