Is there a way to size a stack child automatically to its largest sibling?
I.e. if I have a Stack
with a ListTile
and a Container
on top, how do I make sure the Container
covers the entire ListTile
?
Example:
new Stack(children: <Widget>[
new ListTile(
leading: new AssetImage('foo.jpg'),
title: new Text('Bar'),
subtitle: new Text('yipeee'),
isThreeLine: true,
),
new Container(color: Colors.grey, child: new Text('foo'))
],
)
I tried to make it work with Row
, Column
and Expanded
but am running into problems with unbounded constraints.
Is there a way to size the Container
(or any other widget such as a GestureDetector
) to its largest sibling in the stack?