Emon Hossain Munna
Emon Hossain Munna

Reputation: 755

How to put two container in a row in flutter?

enter image description here

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,),
                      ],
                    )
                  ],
                ),
              ),
            ],
          ),

Upvotes: 0

Views: 2317

Answers (1)

Anas Nadeem
Anas Nadeem

Reputation: 887

Add maxLines: null to your Text widget

Also Wrap your Column widget with Expanded

Upvotes: 1

Related Questions