Items with border in ListView freeze app when scrolling

时间:2018-10-02 09:15:07

标签: flutter

This is code of ListView item

return Container(
  decoration: BoxDecoration(border: Border(bottom: BorderSide(color: Colors.grey,width:0.3))),
  child: Row(
    children: <Widget>[Text(DateFormat("dd/MM/yy HH:mm","ru_Ru").format(DateTime.now())),SizedBox(width: 5.0,height: 45.0,)],
  ),
);

When I scroll down and up, app freeze completely, so I have to kill it.

If I comment decoration it works without any problems

This code works

return Container(
  //decoration: BoxDecoration(border: Border(bottom: BorderSide(color: Colors.grey,width:0.3))),
  child: Row(
    children: <Widget>[Text(DateFormat("dd/MM/yy HH:mm","ru_Ru").format(DateTime.now())),SizedBox(width: 5.0,height: 45.0,)],
  ),
);

0 个答案:

没有答案