Flutter布局

左边两行文字-右边图片.png
return Padding(
      padding: EdgeInsets.all(10),
      child: Flex(
        direction: Axis.horizontal,
        children: [
          Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisSize: MainAxisSize.min,
                children: [
                  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布局)