
如图所示
代码如下:
Widget_rowLine(){
return Row(
children: [
Expanded(
child:Container(
//设置右边框为白色
decoration:BoxDecoration(
//线行渐变
gradient:LinearGradient(colors: [hotelstartColor, hotelendColor]),
border:Border(right:BorderSide(color: Colors.white,width:5))
),
height:100,
),
),
Expanded(
child:Container(
//设置右边框为白色
decoration:BoxDecoration(
color: Colors.yellow,
border:Border(right:BorderSide(color: Colors.white,width:5))
),
height:100,
),
),
Expanded(
child:Container(
height:100,
color: Colors.red,
),
)
],
);
}
2.横向2:1:1 平分,设置右边框,设置渐变
代码如下:
Widget_rowFixLine(){
return Row(
children: [
Expanded(
flex:2,
child:Container(
//设置右边框为白色
decoration:BoxDecoration(
//线行渐变
gradient:LinearGradient(colors: [hotelstartColor, hotelendColor]),
border:Border(right:BorderSide(color: Colors.white,width:5))
),
height:100,
),
),
Expanded(
child:Container(
//设置右边框为白色
decoration:BoxDecoration(
color: Colors.yellow,
border:Border(right:BorderSide(color: Colors.white,width:5))
),
height:100,
),
),
Expanded(
child:Container(
height:100,
color: Colors.red,
),
)
],
);
}
文章均来自互联网如有不妥请联系作者删除QQ:314111741 地址:http://www.mqs.net/post/14779.html
添加新评论