CopyPastor

Detecting plagiarism made easy.

Score: 0.8257699608802795; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2021-07-31
by Divyesh mehta

Original Post

Original - Posted on 2021-01-29
by Muhammad Umair Saqib



            
Present in both answers; Present only in the new answer; Present only in the old answer;

you can also done like this --- separate your condition using (Ternary conditional operator) :
n==1? Column( children: [ SizedBox( child: TextButton( child: Image.asset('images/a.jpg'), ), ), SizedBox( child: TextButton( child: Image.asset('images/b.jpg'), ), ) ], ): /// here Column( children: [ SizedBox( child: TextButton( child: Image.asset('images/a.jpg'), ), ), SizedBox( child: TextButton( child: Image.asset('images/b.jpg'), ), ), ], )
Use Expanded as I used and solved the problem... Expanded solves this text-overflow problem if used in a proper way. Below is my code:
Row( children: <Widget>[ Expanded( flex: 1, child: Icon( Icons.watch_later_outlined, size: 25, color: Colors.blueAccent, ), ), Expanded( flex: 5, child: Text("Write your long text here" ), ), // name ]),

        
Present in both answers; Present only in the new answer; Present only in the old answer;