我想做这个 :
但这是我实际得到的:
这是我的代码:
Row itemTransaction(BuildContext context, Transaction transaction) {
/// This is the function that will build each item of our transaction list.
return new Row(
children: <Widget>[
new Container(
width: MediaQuery.of(context).size.width / 6,
height: MediaQuery.of(context).size.width / 6,
child: new Image.asset(
(transaction.sent) ? "images/tx_output.png" : "images/tx_input.png",
),
),
new Column(
children: <Widget>[
new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
discoderyText("test"),
discoderyText("test 2"),
],
),
discoderyText("SOME HASH KEY"),
],
),
],
);
}
The discoderyText
基本上是自定义文本(即带有颜色)。
正如你所看到的,有mainAxisAlignment: MainAxisAlignment.spaceBetween
设置为我的行,所以test
and test2
should be on 对边.
当我删除图像时,我只返回一个Row
其中包含两个Text
,我设置了mainAxisAlignment
, 有用。这好像是嵌套行不能使用此变量.
这基本上是我的看法的计划: