To create a widget that depends on the parent widget's size, use the ______ widget.

  • AspectRatio
  • Expanded
  • Flexible
  • SizedBox
To create a widget that depends on the parent widget's size, use the AspectRatio widget in Flutter. The AspectRatio widget allows you to maintain a specific aspect ratio for its child, ensuring that it sizes itself based on the aspect ratio provided. This is particularly useful when you want a widget to adapt its size based on the size of its parent while maintaining a specific aspect ratio.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *