Expanded(
//flex: 2,
child: Row(
children: <Widget>[
Expanded(child: Reuseable(colour: Color(0xBAD681))),
Expanded(
child: Reuseable(colour: Color(0xBAD681)),
)
],
)),
class Reuseable extends StatelessWidget {
Reuseable({@required this.colour, this.cardChild});
final Color colour;
final Widget cardChild;
@override
Widget build(BuildContext context) {
return Container(
child: cardChild,
margin: EdgeInsets.all(15.0),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey,
),
color: colour,
borderRadius: BorderRadius.circular(10.0)),.
);
}
}
Это часть кода, который я использовал для создания настраиваемого класса, который по какой-то причине я не могу раскрасить !! Если бы не было границы, классы Reusable были бы невидимы, есть идеи, почему и как это исправить?
Снимок экрана: