Flutter布局

2020-02-20  本文已影响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),
          )
        ],
      ),
    );
上一篇 下一篇

猜你喜欢

热点阅读