展开窗口小部件以匹配flutter中行内的父级高度

时间:2019-10-05 17:31:37

标签: flutter flutter-layout

我想在UI enter image description here下创建

如何在小部件之间绘制一条线,如果尝试在行内扩展列线,则会产生无限高的错误

//下面的一些代码无法发布所有代码。

ListView(
              shrinkWrap: true,
              children: <Widget>[
                new _Row(
                  label: "1",
                  body:
                      "Screening: We will screen your current portfolio to check your Portfolio's health.",
                ),
                SizedBox(
                  height: 16,
                ),
              ],
            ),


class _Row extends StatelessWidget {
  final String label;
  final String body;

  const _Row({Key key, this.label, this.body});

  @override
  Widget build(BuildContext context) {
    return Row(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: <Widget>[
        Container(
          width: 28,
          height: 28,
          decoration: BoxDecoration(
            color: Color(0xff76587b).withOpacity(0.5),
            shape: BoxShape.circle,
          ),
          child: Center(
            child: Text(
              label,
              textAlign: TextAlign.start,
              style: TextStyle(
                  color: Colors.white,
                  fontSize: 16,
                  fontWeight: FontWeight.w500),
            ),
          ),
        ),
        SizedBox(
          width: 16,
        ),
        Flexible(
          child: Text(
            body,
            style: kModelTargetCARGTInactiveTextLabel.copyWith(
                color: Colors.black, height: 1.4),
          ),
        ),
      ],
    );
  }
}

在此代码行中,项目符号点之间不可见。我尝试了may选项,但它不起作用。

0 个答案:

没有答案
相关问题