Friends, I could not use the constraints structure in the container class. Now, according to my text child, while waiting for the min, max values to be formed, I always output maxwidth, maxheight values, even if the text content is little. As expected in the training video I watched, it grows according to the max value given according to the text content. but I could not.my code and quit:
body: Center(
child: Container(
alignment: AlignmentDirectional.centerStart,
color: Colors.yellow,
child: Text(
"Merhaba",
style: TextStyle(color: Colors.red, fontSize: 25),
),
constraints: BoxConstraints(
maxHeight: 300.0,
maxWidth: 200.0,
minWidth: 150.0,
minHeight: 150.0)
),
),
Text size is 25, the result is: https://i.stack.imgur.com/ZHNTG.png
I tried font size as 250, the result is: