如何连续放置两个容器?
How to put two container in a row in flutter?
I Have wrapped two expanded view inside a row but couldn't manage to
wrap. its going out of my screen layout.
as a new comer in flutter technology, i appreciate someones help.
Row(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
flex: 1,
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Image.asset('assets/images/checked.png',height: 24,width: 24,),
SizedBox(width: 5,),
Text('Gated Security',style: Constant.infoTextStyle,)
],
),
),
Expanded(
flex: 1,
child: Row(
children: [
Image.asset('assets/images/checked.png',height: 24,width: 24,),
SizedBox(width: 5,),
Column(
children: [
Text('Individual slips and along-side docking',style: Constant.infoTextStyle,textAlign: TextAlign.start,),
],
)
],
),
),
],
),
将 maxLines: null
添加到您的 Text
小部件
还用 Expanded
包装您的 Column
小部件
I Have wrapped two expanded view inside a row but couldn't manage to wrap. its going out of my screen layout.
as a new comer in flutter technology, i appreciate someones help.
Row(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
flex: 1,
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Image.asset('assets/images/checked.png',height: 24,width: 24,),
SizedBox(width: 5,),
Text('Gated Security',style: Constant.infoTextStyle,)
],
),
),
Expanded(
flex: 1,
child: Row(
children: [
Image.asset('assets/images/checked.png',height: 24,width: 24,),
SizedBox(width: 5,),
Column(
children: [
Text('Individual slips and along-side docking',style: Constant.infoTextStyle,textAlign: TextAlign.start,),
],
)
],
),
),
],
),
将 maxLines: null
添加到您的 Text
小部件
还用 Expanded
Column
小部件