Skip to content

[Story of Your Layout] Visualize main axis spaces#1378

Merged
albertusdev merged 5 commits intoflutter:masterfrom
albertusdev:story-of-layout-visualize-main-axis-spaces
Nov 23, 2019
Merged

[Story of Your Layout] Visualize main axis spaces#1378
albertusdev merged 5 commits intoflutter:masterfrom
albertusdev:story-of-layout-visualize-main-axis-spaces

Conversation

@albertusdev
Copy link
Contributor

Changelist:

  • Visualize main axis spaces

TODOs:

  • Add tests to verify tons of computations done here
  • Add animation (so exciting!!!)
  • Do better job on scaling so that we don't need to scroll

Demo:

https://www.youtube.com/watch?v=dcf9tC2iaB8&feature=youtu.be

}
}

double computeSpaceAfterChildren({
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a helper method that does the logic for all cases but start, and end and call it from both these helpers.
You could call the helper
_computeSpaceBetweenChildren
and have it assert if MainAxisAlignment is start or end.

Copy link
Contributor

Choose a reason for hiding this comment

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

or maybe _computeSpaceHelper

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 some minor comments

@albertusdev albertusdev force-pushed the story-of-layout-visualize-main-axis-spaces branch from 624ca5e to eb5b159 Compare November 23, 2019 01:16
@albertusdev albertusdev changed the title [WIP][Story of Your Layout] Visualize main axis spaces [Story of Your Layout] Visualize main axis spaces Nov 23, 2019
@albertusdev albertusdev merged commit edd00e2 into flutter:master Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants