I'm working with flutter recently. When I layout the text, I usually put a Text
into a Container
and set the distance between components
. My example code and the pictures will be below. However, I found the Text
content wouldn't close to the edge, which makes the distance I set is not exactly accurate. So how should I solve the problem, or is there any better solution in my situation?
Container(
color: Colors.red,
width: double.infinity,
height: ScreenAdapt.heightToDp(32),
child: Text(
'some text content',
style: MyTextStyle.level3
),
),