Thread
#compose
    v

    Vladimir Ivanov

    3 years ago
    Also, why root surface is expanded on a whole screen while surface enclosing say an EditableText does not?
    Andrey Kulikov

    Andrey Kulikov

    3 years ago
    Surface is taking a size of it's children. there are some layout which are taking all the available space and some that wraps. For example there is a Wrap component for this
    l

    Leland Richardson [G]

    3 years ago
    hmm - this is kinda confusing though, isn’t it? You’re saying that
    Surface { }
    ends up expanding to fill all space, but
    Surface { Text(...) }
    will wrap the text?
    Andrey Kulikov

    Andrey Kulikov

    3 years ago
    Surface with no child will use min constraint size, which should be 0. but a lot Layouts we have take all the available space by default. So if you wrap them into Surface that would fill the space