行内的颤动文本导致溢出错误

Flutter text inside row causing overflow error

文本 simply dummy text of simply dummy text of simply dummy text of 导致错误 A RenderFlex overflowed by 201 pixels on the right.

This is screenshot of screen with error

Widget build(BuildContext context) {
  return Padding(
      padding: const EdgeInsets.all(16.0),
      child: Column(
        children: [
          Row(
            children: [
              Container(
                width: 110,
                height: 110,
                padding: EdgeInsets.all(8),
                child: Container(
                  child: Image.network(
                    "https://reedius.s3.ap-south-1.amazonaws.com/temp/Groceries-ThinkstockPhotos-836782690.jpeg",
                    fit: BoxFit.cover,
                  ),
                ),
              ),
              Column(
                children: [
                  Text(
                    'simply dummy text of  simply dummy text of  simply dummy text of  ',
                  ),
                  SizedBox(width: 100, child: TextField()),
                ],
              ),
            ],
          ),
        ],
      ));
}

试试下面的代码将你的 Column 包裹在 Expanded or Flexible

Padding(
      padding: const EdgeInsets.all(16.0),
      child: Column(
        children: [
          Row(
            children: [
              Container(
                width: 110,
                height: 110,
                padding: EdgeInsets.all(8),
                child: Container(
                  child: Image.network(
                    "https://reedius.s3.ap-south-1.amazonaws.com/temp/Groceries-ThinkstockPhotos-836782690.jpeg",
                    fit: BoxFit.cover,
                  ),
                ),
              ),
              Expanded(
                child: Column(
                  children: [
                    Text(
                      'simply dummy text of  simply dummy text of  simply dummy text of  ',
                      overflow: TextOverflow.ellipsis,
                    ),
                    SizedBox(width: 100, child: TextField()),
                  ],
                ),
              ),
            ],
          ),
        ],
      ),
    );