What are constraints in Flutter Layout?
Each widget in Flutter receives constraints from its parent (min and max width/height).
The widget must fit inside those constraints.
Example:
Each widget in Flutter receives constraints from its parent (min and max width/height).
The widget must fit inside those constraints.
Example:
Container( constraints: BoxConstraints(maxWidth: 200), child: Text("Hello World"), );
Comments
Post a Comment