0
点赞
收藏
分享

微信扫一扫

flutter 中用边框实现三角形

暮晨夜雪 2021-10-04 阅读 63

Container(
  width: 24,
  height: 0,
  decoration: new BoxDecoration(
    border: Border(
      // 四个值 top right bottom left
      bottom: BorderSide(
          color: Colors.white,
          width: ScreenUtil().setHeight(16),
          style: BorderStyle.solid),
      right: BorderSide(
          color: Colors.transparent,
          width: 12,
          style: BorderStyle.solid),
      left: BorderSide(
          color: Colors.transparent,
          width: 12,
          style: BorderStyle.solid),
    ),
  ),
),

举报

相关推荐

0 条评论