This is the likes Widget which shows likes. It is called inside a scrollview column of another dart file. Everything was working fine before this widget's addition
@override
Widget build(BuildContext context) {
return Container(
height: 100,
child: Row(
children: <Widget>[
Expanded(
child: ListTile(
leading: IconButton(
icon: likedByReader
? Icon(Icons.favorite, color: Colors.orange)
: Icon(Icons.favorite, color: Colors.grey),
onPressed: _pressed,
),
),
),
Expanded(
child: Text('${likesList.length} likes'),
)
],
),
);
}
This is how LikeWidget is called
Expanded(child: LikeWidget(widget.readerEmail, widget.blogUIDInFirebase),),
Error shown in the console
RenderFlex children have non-zero flex but incoming height constraints are unbounded.
RenderBox was not laid out: _RenderSingleChildViewport#89f28 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1694 pos 12: 'hasSize'