Answers for "flutter height as much as content"

0

flutter height as much as content

You can do with little Trick: Suppose you have requirement of : ( Width,Height )

Solution1: Wrap_content ,Wrap_content:

//use this as child
 Wrap(
  children: <Widget>[*your_child*])

Solution2: Match_parent,Match_parent:

//use this as child
Container(
        height: double.infinity,
    	width: double.infinity,
    	child:*your_child*)


Solution3: Match_parent,Wrap_content :

//use this as child
Row(
  mainAxisSize: MainAxisSize.max,
  children: <Widget>[*your_child*],
);


Solution4: Wrap_content ,Match_parent:

//use this as child
Column(
  mainAxisSize: MainAxisSize.max,
  children: <Widget>[your_child],
);
Posted by: Guest on August-23-2021

Code answers related to "flutter height as much as content"

Browse Popular Code Answers by Language