flutter 线性布局,填充
时间:2023-02-03 11:30:00
Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded(/个很关键 child: Container( alignment: Alignment.center,//这是填充 child: const Text( " ", style: TextStyle(fontSize: 18), ), ), ), Expanded(/个很关键 child: Container( margin: const EdgeInsets.only(left: 16, top: 15), alignment: Alignment.center,//这是填充 child: const Text( "扔一个", style: TextStyle( fontSize: 16, color: Color(0xFF1A1A1A), fontWeight: FontWeight.w500), ), ), ), Expanded(/个很关键 child: GestureDetector( onTap: () {
MyRouter.pushMy(context, BottleRule());
},
child: Container(
alignment: Alignment.centerRight,//这个是填满
margin: EdgeInsets.only(top: 15),
child: Container(
margin: EdgeInsets.only(right: 16),
child: const Image(
image: AssetImage(
'assets/images/icon_drift_instrution_black.png'),
width: 24,
height: 24,
),
),
),
)),
],
),