美文网首页
Flutter布局

Flutter布局

作者: 做你的小星星 | 来源:发表于2020-02-20 15:38 被阅读0次
    左边两行文字-右边图片.png
    return Padding(
          padding: EdgeInsets.all(10),
          child: Flex(
            direction: Axis.horizontal,
            children: <Widget>[
              Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    mainAxisSize: MainAxisSize.min,
                    children: <Widget>[
                      Text('123'),
                      Container(height: 10,),
                      Text('jhkjhkjhhhhhhhhhhkhkjhjggkuyfuyftfjygkfjgkgjhgjgjhgjhgjgjservicenamejhkjhkjhhhhhhhhhhkhkjhjggkuyfuyftfjygkfjgkgjhgjgjhgjhgjgjservicename',
                        maxLines: 2,
                        style: TextStyle(
                            fontSize: 14,
                            decoration: TextDecoration.none),
                        overflow: TextOverflow.ellipsis,
                      ),
                    ],
                  )
              ),
              Padding(
                padding: EdgeInsets.only(left: 10),
                child: Icon(Icons.my_location),
              )
            ],
          ),
        );
    

    相关文章

      网友评论

          本文标题:Flutter布局

          本文链接:https://www.haomeiwen.com/subject/utpxqhtx.html