Материал (высота: 0,
child:
Container(
margin: const EdgeInsets.only(
bottom: 10
),
child: Stack(
children: <Widget>[
Positioned(
left: 30,
child: Container(
padding: EdgeInsets.only(
left: 50
),
height: 80,
color: Colors.black12,
child: Text("From : " + bills[index].fromDate.toString() + ""
"to : " + bills[index].toDate.toString()),
),
),
Container(
width: 80.0,
height: 80.0,
decoration: new BoxDecoration(
color: Colors.orange,
shape: BoxShape.circle,
),
),
Positioned(
top: 20,
left: 10,
child: Text(bills[index].bill.toString() + bills[index].currency),
),
],
),
),
);
В приведенном выше коде этот виджет ниже является элементом стека, и я не могу установить ширину в соответствии с родителями. Обычно я страдаю установкой атрибута match_parent в трепете. Я применяю решение SizedBox.extend. Решение не работает для меня.
Позиционировано (слева: 30, потомок: Контейнер (
padding: EdgeInsets.only(
left: 50
),
height: 80,
color: Colors.black12,
child: Text("From : " + bills[index].fromDate.toString() + ""
"to : " + bills[index].toDate.toString()),
),
),
Пожалуйста, помогите мне. Спасибо заранее .