Skip to content

Documentation for location of non-positioned children in RenderStack is wrong #12885

Description

@kezhuw

The second paragraph of RenderStack's documentation says that:

/// The final location of non-positioned children is determined by the alignment
/// parameter. The left of each non-positioned child becomes the
/// difference between the child's width and the stack's width scaled by
/// alignment.x. The top of each non-positioned child is computed
/// similarly and scaled by alignment.y. So if the alignment x and y properties
/// are 0.0 (the default) then the non-positioned children remain in the
/// upper-left corner. If the alignment x and y properties are 0.5 then the
/// non-positioned children are centered within the stack.

Sounds like it describes alignment for FractionalOffset. Current implementation uses Alignment.

I am not a native English speaker, and feels hard to express the intention.

Activity

  1. Hixie commented on Nov 7, 2017

    @Hixie
    Contributor

    Thanks for catching this!

  2. added
    d: api docsIssues with https://api.flutter.dev/
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Nov 7, 2017
  3. added this to the 3: Current Milestone milestone on Nov 7, 2017
  4. modified the milestones: 3: Current Milestone, on Dec 20, 2017
  5. changed the title [-]Outdated document for location of non-positioned children in RenderStack[/-] [+]Documentation for location of non-positioned children in RenderStack is wrong[/+] on Mar 3, 2020
  6. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  7. removed this from the milestone on Aug 17, 2020
  8. added a commit that references this issue on Mar 24, 2026
    82d96ef
  9. added a commit that references this issue on Mar 26, 2026
    e4de7a5
  10. github-actions commented on Apr 8, 2026

    @github-actions

    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.

  11. locked as resolved and limited conversation to collaborators on Apr 8, 2026
  12. added a commit that references this issue on Apr 14, 2026
    4cec0eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions