美文网首页
Flutter 设置横线

Flutter 设置横线

作者: 菜鸟考官 | 来源:发表于2020-06-11 09:52 被阅读0次
     // Description:横线
    class HorizontalLine extends StatelessWidget {
    final double dashedWidth;
    final double dashedHeight;
    final Color color;
    
    HorizontalLine({
        this.dashedHeight = 1,
        this.dashedWidth = double.infinity,
        this.color = const Color(0xFF979797),
      });
    
      @override
      Widget build(BuildContext context) {
        return Container(width: dashedWidth, height: dashedHeight, color: color);
      }
    }
    

    用法

      HorizontalLine(),

    相关文章

      网友评论

          本文标题:Flutter 设置横线

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