Flutter Stack size to sibling

Multi tool use
Flutter Stack size to sibling
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
?
Stack
ListTile
Container
Container
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.
Row
Column
Expanded
Is there a way to size the Container
(or any other widget such as a GestureDetector
) to its largest sibling in the stack?
Container
GestureDetector
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
pub.dartlang.org/packages/after_layout might be able to help you
– Günter Zöchbauer
Jul 2 at 5:40