Container & Text - flutter

Container(
        child: Text(
        "what are you doing??",
          // textDirection: TextDirection.ltr, //文本方向
          // textAlign: TextAlign.left, //文本对其方式, 此选项优先
          // overflow: TextOverflow.ellipsis, //文本超过一行部分用省略号代替
          //    textScaleFactor: 1.5, //字体大小
          // maxLines: 3, //最多显示几行
          style: TextStyle(
              color: Colors.green,
              decoration: TextDecoration.lineThrough, //设置中间删除线,上端删除线, 下端删除线
              decorationColor: Colors.pink, //删除线颜色
              decorationStyle: TextDecorationStyle.double, //删除线样式, 实线, 虚线, 双删除线等...
              wordSpacing: 0.1, //单词之间的间距
              letterSpacing: 0.1, //字母间距
              fontStyle: FontStyle.normal, //那种字体
              fontSize: 15,
              fontWeight: FontWeight.w900 //字体线粗度
          ),
        ),
        // child: Image.asset('images/ali.jfif'),
        height:105,
        width: 100,
        alignment: Alignment.topLeft, //容器子元素对齐方式
        decoration: BoxDecoration(
          color: Colors.orange, //容器背景色
          border: Border.all(
            color: Colors.pink,
            width: 2.0
          ),
          borderRadius: BorderRadius.all( //容器圆角
            Radius.circular(20)
          ),
          image: DecorationImage( //容器背景图片
            image:NetworkImage(
              "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606228192857&di=8290dfcf5d14afdabcb11e67ae675320&imgtype=0&src=http%3A%2F%2Fpic.rmb.bdstatic.com%2F9d7596f4813e84e48fa247548251d3ed.jpeg%40c_1%2Cw_700%2Ch_700%2Cx_0%2Cy_0",
            ),
            fit: BoxFit.fitWidth
          ),
        ),
        margin: EdgeInsets.only(left: 200, top: 100),  //盒子外边距
        padding: EdgeInsets.all(5), // 盒子内边距
        transform: Matrix4.rotationZ(0.5), // 旋转效果
      )

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值