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), // 旋转效果
)
Container & Text - flutter
最新推荐文章于 2022-11-10 11:18:00 发布