You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flutter: Is the official documentation for align wrong? #68680
The 0.2 is the xAlign and the 0.6 is the YAlign, follow the formulas in the official documentation and finally calculate a point (36.0,48.0). When xAlign is less than zero or yAlign is less than zero, the calculation according to this formula is always positive. And the formula for calculating the offset of FlutterLogo and Container in the source code is as follows(alignment.dartlines:290):
Offset other = size - child!.size as Offset;
final double centerX = other.dx / 2.0;
final double centerY = other.dy / 2.0;
childParentData.offset = Offset(centerX + xAlign * centerX, centerY + yAlign * centerY);
The result according to the formula in the source code does not seem to have any relation to (36,48). Did I misunderstand or did the document say something wrong?
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
darshankawar commentedon Oct 21, 2020
Keeping this issue open for further analysis.
github-actions commentedon Apr 11, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.