我是flutter的新手,正在尝试在flutter中实现自定义列表视图。在布局错误期间,其给定的RenderCustomMultiChildLayoutBox对象提供了无限大小
2还请建议如何调试这些布局错误,因为错误跟踪没有针对其引发错误的特定窗口小部件信息
请找到以下相同的代码:
class ChatItemSreen extends StatelessWidget {
var leftSection;
var middleSection;
var rightSection;
ChatModel _chartObj;
ChatItemSreen(ChatModel _chartObj) {
this._chartObj = _chartObj;
//.........the left section ...........................
CircleAvatar image = new CircleAvatar(
backgroundColor: Colors.lightGreen,
backgroundImage: new NetworkImage(this._chartObj.geturl()),
radius: 24.0,
);
leftSection = new Container(child: image);
//.........the middle section ...........................
middleSection = new Expanded(
child: new Container(
padding: new EdgeInsets.only(left: 8.0),
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
new Text(this._chartObj.getuserName(),
style: new TextStyle(
color: Colors.black,
fontWeight: FontWeight.w300,
fontSize: 16.0)), …Run Code Online (Sandbox Code Playgroud)