Add a color argument to Container. (#8396)
It's common to just want a simple colored box. Simple thing should be simple, so this patch adds a convenience argument to Continer for creating a box decoration that is just a color. Fixes #5555
This commit is contained in:
@@ -324,7 +324,7 @@ class CardCollectionState extends State<CardCollection> {
|
||||
child: new SingleChildScrollView(
|
||||
child: new Container(
|
||||
height: cardModel.height,
|
||||
decoration: new BoxDecoration(backgroundColor: theme.primaryColor),
|
||||
color: theme.primaryColor,
|
||||
child: new Row(
|
||||
children: <Widget>[
|
||||
leftArrowIcon,
|
||||
@@ -378,7 +378,7 @@ class CardCollectionState extends State<CardCollection> {
|
||||
|
||||
Widget body = new Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 8.0),
|
||||
decoration: new BoxDecoration(backgroundColor: _primaryColor[50]),
|
||||
color: _primaryColor[50],
|
||||
child: cardCollection,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user