简体   繁体   English

如何让我的文本在容器中置顶

[英]How to make my text go to top in a container

I want to make my output like this:我想让我的输出是这样的:

  1. ahjskdgad阿杰斯克德加德
  2. asdhadada阿斯达达
  3. asdhasuidhad阿达苏伊哈德
  4. adhauishda saidjajiasdasd adhauishda saidjajiasdasd
  5. asodhasdhasid isdoaoisdhas asodhasodh asodhasdhasid isdoaoisdhas asodhasodh

Code:代码:

Container(
      width: 300,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            children: [
              Container(
                width: 10,
                child: Text(
                  '4.',
                  style: TextStyle(
                      color: Colors.white,
                      fontSize: 10,
                      fontWeight: FontWeight.w500),
                  textAlign: TextAlign.justify,
                ),
              ),
              Container(
                width: 290,
                child: Text(
                  'I hereby acknowledge and consent that company shall provide me with the information only through a durable medium, (i.e., any instrument which enables a client to store information for future reference and adequate period, and allows the unchanged reproduction of the information stored.',
                  style: TextStyle(
                      color: Colors.white,
                      fontSize: 10,
                      fontWeight: FontWeight.w500),
                  textAlign: TextAlign.justify,
                ),
              )
            ],
          ),
          Row(
            children: [
              Container(
                width: 10,
                child: Text(
                  '5.',
                  style: TextStyle(
                      color: Colors.white,
                      fontSize: 10,
                      fontWeight: FontWeight.w500),
                  textAlign: TextAlign.justify,
                ),
              ),
              Container(
                width: 290,
                child: Text(
                  'You agree that company may collect, use and disclose your personal data which you have provided in this form, for providing marketing material that you have agreed to receive, in accordance with Privacy Policy.',
                  style: TextStyle(
                      color: Colors.white,
                      fontSize: 10,
                      fontWeight: FontWeight.w500),
                  textAlign: TextAlign.justify,
                ),
              )
            ],
          ),
        ],
      ),
    ),

如果这是您要实现的目标,只需在行中添加crossAxisAlignment: CrossAxisAlignment.start

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM