Skip to content

How to make the width and height of the parent component follow the space occupied by the Html component display content #565

@fengerwoo

Description

@fengerwoo

For example, in the following code, I want the parent component Container not to set the width and height, and automatically determine the width and height of the parent component Container according to the size of the displayed content of the Html component

Container(
    child: Html(
      data: "<div class='body_wrap'>${item}<div>",
      style: {
        ".body_wrap": Style(
          fontSize: FontSize(rpx(26)),
          color: Color(0x99303030),
        )
      },
    )
),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions