Flutter

flutter 中用边框实现三角形

2021-01-12  本文已影响0人  NanaCti

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),
    ),
  ),
),

上一篇下一篇

猜你喜欢

热点阅读